Link to home
Start Free TrialLog in
Avatar of Emilio Morimoto
Emilio Morimoto

asked on

How do I import Outlook Shared Contacts with VFP

With the examples located here in the experts, I succeed in reading the contacts from Outlook and transfer them to dbf tables (using VFP).
 However, I can not read contacts shared by other users.
 Could someone help me?

translate from portuguese:

"Com os exemplos localizados aqui no experts, eu obtive sucesso na leitura dos contatos do outlook e transferí-los para tabelas dbf ( utilizando o VFP ).
No entanto, não consigo ler os contatos compartilhados por outros usuários.
Alguem poderia me ajudar?"
Avatar of Pavel Celba
Pavel Celba
Flag of Czechia image

What everything did you try in Outlook object model?

Try this:

oOutlook = CREATEOBJECT('outlook.application')
oNameSpace = oOutlook.getnamespace('MAPI')
FOR i = 1 TO oNameSpace.Folders.Count
  ?  oNameSpace.Folders(i).Name
NEXT

If this will not show the right direction then you have to play with

oNameSpace.GetSharedDefaultFolder
oNameSpace.OpenSharedFolder

(http://msdn.microsoft.com/en-us/library/microsoft.office.interop.outlook._namespace.getshareddefaultfolder.aspx,
http://msdn.microsoft.com/en-us/library/microsoft.office.interop.outlook._namespace.opensharedfolder.aspx)
Avatar of Emilio Morimoto
Emilio Morimoto

ASKER

translate from portuguese:

Sorry, but I did not know how to use the

oNameSpace.GetSharedDefaultFolder
oNameSpace.OpenSharedFolder

Could you detail please?


" Desculpe, mas eu não soube como utilizar o

oNameSpace.GetSharedDefaultFolder
oNameSpace.OpenSharedFolder

Poderia detalhar, por favor? "
GetSharedDefaultFolder, OpenSharedFolder?  Somebody from Outlook zone should tell.


How many folders do you see when executing this code?

oOutlook = CREATEOBJECT('outlook.application')
oNameSpace = oOutlook.getnamespace('MAPI')
FOR i = 1 TO oNameSpace.Folders.Count
  ?  oNameSpace.Folders(i).Name
NEXT

this code:

oOutlook = CREATEOBJECT('outlook.application')
oNameSpace = oOutlook.getnamespace('MAPI')
FOR i = 1 TO oNameSpace.Folders.Count
  ?  oNameSpace.Folders(i).Name
NEXT

identify two folders:

Mailbox
Public folders

ASKER CERTIFIED SOLUTION
Avatar of Pavel Celba
Pavel Celba
Flag of Czechia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I see that the solution lies in understanding the examples in other languages ¿¿and converts them to the VFP.
Unfortunately I do not have time and knowledge at the time, but I promise to try.
Thank you for your attention.

Translate from portuguese:

Vejo que a solução está em entender os exemplos em outras linguagens e converte-los para o VFP.
Infelizmente não disponho de tempo e conhecimento no momento, mas prometo tentar.
Grato a todos pela atenção.