T
TS Lim
I develop a VBA sub procudure. This procedure adds a new contact item to the
default outlook folder. It works fine. But when switch to a different window
user and run the sub procedure again, no new contact item is created. Kindly
advise what are the possile cause of this.
Below is part of my procedure for creating new item in the outlook contact
folder.
Dim ol As Outlook.Application
Dim olns As Outlook.NameSpace
Dim olMAPI As Outlook.MAPIFolder
Dim olCI As Outlook.ContactItem
Set ol = New Outlook.Application
Set olns = ol.GetNamespace("MAPI")
Set olMAPI = olns.GetDefaultFolder(olFolderContacts)
Set olCI = ol.CreateItem(olContactItem)
olCI.MessageClass = "IPM.Contact"
If Me.LastName <> "" Then olCI.LastName = "ABC"
olCI.Save
Appreciate for your advise.
default outlook folder. It works fine. But when switch to a different window
user and run the sub procedure again, no new contact item is created. Kindly
advise what are the possile cause of this.
Below is part of my procedure for creating new item in the outlook contact
folder.
Dim ol As Outlook.Application
Dim olns As Outlook.NameSpace
Dim olMAPI As Outlook.MAPIFolder
Dim olCI As Outlook.ContactItem
Set ol = New Outlook.Application
Set olns = ol.GetNamespace("MAPI")
Set olMAPI = olns.GetDefaultFolder(olFolderContacts)
Set olCI = ol.CreateItem(olContactItem)
olCI.MessageClass = "IPM.Contact"
If Me.LastName <> "" Then olCI.LastName = "ABC"
olCI.Save
Appreciate for your advise.