ich habe folgendes Problem:
Ich möchte Kontakte an Outlook übermitteln. Das Auslesen klappt sehr gut, ich kann den Kontakte-Ordner auswählen, mit dem ich abgleichen möchte, aber wenn ich einen neuen Kontakt anlege, erscheint er nicht in Outlook.
Folgende Zugriffe (verkürzt) nehme ich vor (Auslesen):
Code: Alles auswählen
oOutlook := CreateObject( "Outlook.Application" )
.....
oNS := oOutlook:GetNamespace( "MAPI" ) //* returns NameSpace
...
oContacts:=oNS:PickFolder() //* returns NameSpace
if oContacts<>NIL
if oContacts:DefaultItemType<>olContactItem
*** Kein Kontakte-Ordner
.....
endif
endif
nOlAnzahl:=oContacts:items:count
for i:=1 to nOlAnzahl
m->oContact := oContacts:items(i)
......
for ii:=1 to len(aContacts)
f:=aContacts[ii][3][1]
l:=aContacts[ii][3][3]
inh:=&("M->oContact:"+aContacts[ii,2])
replace &f with substr(DC_XtoC(inh),1,l)
next
next
Code: Alles auswählen
...
countnew+=NewOlSatz(oContacts)
......
********************
function NewOlSatz(oC)
local oNew, i, retw:=0
if (oNew:=oC:Items:Add(olContactItem))<>NIL
oNew:CompanyName:=alltrim(outl->firma)
oNew:LastName:=alltrim(outl->name1)
oNew:Email1Address:=alltrim(outl->email)
oNew:BusinessTelephoneNumber:=alltrim(outl->tele1)
oNew:BusinessFaxNumber:=alltrim(outl->fax)
oNew:CustomerID:=str(art,3)+str(nummer,7)
retw:=1
endif
return retw
Hat sich damit schon jemand beschäftigt ?