Alaska Software Inc. - Outlook Mail Folder
Username: Password:
AuthorTopic: Outlook Mail Folder
Jim LeeOutlook Mail Folder
on Mon, 18 Jun 2018 17:29:58 +0200
hi,

i can translate this

   Set myNameSpace = Application.GetNameSpace("MAPI")
   Set myFolder = _myNameSpace.GetDefaultFolder(olFolderInbox)

into

   ::oNS  := ::oOutlook:GetNamespace( "MAPI" )
   ::oMails := ::oNS:getDefaultFolder( olFolderInbox )

and it work.

now i want to use my own Folder "Xbase"

   Set myNewFolder = myFolder.Folders("Xbase")

and i try

   ::oMails:callMethod("Folders","Xbase") -> crash
   ::oMails:setProperty("Folders","Xbase") -> crash
   ::oNS:GetDefaultFolder(6):callMethod("Folders","Xbase") -> crash

but none work 

than i try to GetProperty which seems ok

   oFolder := ::oNS:getProperty("Folders") -> Automation Object
   iMax := oFolder:count   -> 1

but i still can't use this

   ::oNS:setProperty("Folders","Xbase")    -> crash
   oFolder:callMethod("Folders","Xbase") -> crash
   oFolder:setProperty("Folders","Xbase") -> crash

so how to use o:InterfaceName() = "_Folders" ?
Wolfgang CiriackRe: Outlook Mail Folder
on Mon, 18 Jun 2018 18:26:54 +0200
Am 18.06.2018 um 17:29 schrieb Jim Lee:
> hi,
> 
> i can translate this
> 
>     Set myNameSpace = Application.GetNameSpace("MAPI")
>     Set myFolder = _myNameSpace.GetDefaultFolder(olFolderInbox)
> 
> into
> 
>     ::oNS  := ::oOutlook:GetNamespace( "MAPI" )
>     ::oMails := ::oNS:getDefaultFolder( olFolderInbox )
> 
> and it work.
> 
> now i want to use my own Folder "Xbase"
> 
>     Set myNewFolder = myFolder.Folders("Xbase")
> 
> and i try
> 
>     ::oMails:callMethod("Folders","Xbase") -> crash
>     ::oMails:setProperty("Folders","Xbase") -> crash
>     ::oNS:GetDefaultFolder(6):callMethod("Folders","Xbase") -> crash
> 
> but none work 
> 
> than i try to GetProperty which seems ok
> 
>     oFolder := ::oNS:getProperty("Folders") -> Automation Object
>     iMax := oFolder:count   -> 1
> 
> but i still can't use this
> 
>     ::oNS:setProperty("Folders","Xbase")    -> crash
>     oFolder:callMethod("Folders","Xbase") -> crash
>     oFolder:setProperty("Folders","Xbase") -> crash
> 
> so how to use o:InterfaceName() = "_Folders" ?
> 
> 
I use oNS:PickFolder(), myFolderID:=oFolder:EntryID and later 
oNS:GetFolderFromID(myFolderId)
Jim LeeRe: Outlook Mail Folder
on Mon, 18 Jun 2018 23:23:09 +0200
hi,

> I use oNS:PickFolder(), myFolderID:=oFolder:EntryID and later 
> oNS:GetFolderFromID(myFolderId)

Yes, this is to pick 1 Folder but i want to backup all Folder.

it got it now using Property "Parent" of MAPIfolder

    use Parent of Folder
   oParent := ::oMails:Parent

Folder are Child so i have to use

   oParent:Folders(j)
   oParent:callMethod("Folders",cFolder)
Jim LeeRe: Outlook Mail Folder
on Thu, 21 Jun 2018 19:30:55 +0200
does someone work with DispHPR instead of Alaska activeX ?

it does work fine with Xbase++ activeX this Way

   oParent:callMethod("Folders",cFolder)

now with ot4xb / DH i try this

#xtranslate LL(<c>)  => cSzAnsi2Wide(<c>)

      pMails := _dh_CallMethod(pParent , LL(".Folders   = %s"),cFolder)
      pMails := _dh_CallMethod(pParent , LL(".Folders() = %s"),cFolder)
      pMails := _dh_CallMethod(pParent , LL(".Folders(%d) = %s"),j,cFolder)
      pMails := _dh_CallMethod(pParent , LL(".Folders(%s)"),cFolder)

but none of it works 
i also try Property

      pMails := _dh_PutValue(pParent, LL(".Folders   = %s"),cFolder)
      pMails := _dh_PutValue(pParent, LL(".Folders() = %s"),cFolder)
      pMails := _dh_PutValue(pParent, LL(".Folders(%d) = %s"),j,cFolder)
      pMails := _dh_PutValue(pParent, LL(".Folders(%s)"),cFolder)

but still does not work

as all Pointer work before i guess they are ok so i do not unterstand why my 
Code fail.
need help please