Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Outlook MAPI
Message
 
To
15/06/2005 00:33:20
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Title:
Miscellaneous
Thread ID:
01023324
Message ID:
01023635
Views:
13
This message has been marked as the solution to the initial question of the thread.
Geoff,

I don't think you can access a folder by name, however the Sync operation is applied to the entire collection of SyncObjects.AppFolders. IOW, if you need to have a folder synchronized, it should be registered as an AppFolder sync object by setting its InAppFolderSyncObject prop to .T.
Ex:
loOLFolder.InAppFolderSyncObject = .T.
>Hi Sorin
>
>Thanks for that.
>
>I know I can access the sync object by
>
m.loOLSyncs.Item(m.i)
>but is it possible to access it via its name?
>
>I tried
>m.MySync = m.loOLns.SyncObjects.AppFolders("TEST")
>m.MySync.Start
>
>but that gave me errors. Any ideas
>
>Thanks once again
>
>Geoff Scott
>
>
>
>>Hi Geoff,
>>
>>I adapted the following code for VFP from a VB.NET sample found here:
>>http://support.microsoft.com/default.aspx?scid=kb;en-us;313793
>>
>>Here is the VFP code:
>>
>>LOCAL i, ;
>>   loOL AS Outlook.Application, ;
>>   loOLns AS Outlook.NameSpace, ;
>>   loOLsyncs AS Outlook.SyncObjects, ;
>>   loOLsync AS Outlook.SyncObject
>>*
>>loOL = CREATEOBJECT("Outlook.Application")
>>loOLns = m.loOL.GetNamespace("mapi")
>>loOLSyncs = m.loOLns.SyncObjects
>>FOR m.i = 1 TO m.loOLSyncs.Count
>>   loOLSync = m.loOLSyncs.Item(m.i)
>>   loOLSync.Start
>>ENDFOR
>>loOLsync = NULL
>>loOLsyncs = NULL
>>loOLns = NULL
>>loOL = NULL
>>
>>
>>HTH
>>
>>
>>
>>>Hi
>>>
>>>Can someone tell me if it is possible to tell outlook to check its mail and download new email.
>>>
>>>I can login and read mail but cant seem to find how I get it to download mail on request.
>>>
>>>Ta very muchly
>>>Geoff Scott
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform