P
Pat Curran
Hi;
I use visual dbase and am confused about creating a distribution list with
my employees. I add all my employees to my Outlook Contacts using the
following code:
myOlApp=new oleautoclient('outlook.application')
olMAPI=myOlApp.GetNameSpace("MAPI")
if type("myOlApp.Assistant") # 'O'
myFolder.Display()
endif
Myfolder = olMAPI.getdefaultfolder(10) && Contacts
myitems = myfolder.items
myItem= myOlApp.CreateItem(2)
myItem.firstname = 'JOHN'
myItem.lastname = 'DOE'
myItem.Hometelephonenumber = ltrim(rtrim(Contacts->localphone))
myItem.governmentidnumber = ltrim(rtrim(Contacts->ssan))
myItem.save()
I now want to create distribution lists, and am having a very difficult time
doing so. I can use the following code to create the item:
oOutlook = new oleAutoClient("outlook.application")
oItem = oOutlook.createItem(7)
oItem.dlname = 'Empolyees'
oItem.save()
oItem.Display()
Now I can view the distribution list. The problem I am having, is how do I
add the members programatically? The members are in my contacts folder.
Assuming that a contacts first name is 'John' and his last name is 'Doe' How
would he be added? I tried:
oItem.recipients.add = 'DOE, JOHN' but it doesnt work. I also tried:
oItem.AddMembers = 'DOE, JOHN' and I recieve an error stating the object
property is read only. Any help would be appreciated.
Pat
I use visual dbase and am confused about creating a distribution list with
my employees. I add all my employees to my Outlook Contacts using the
following code:
myOlApp=new oleautoclient('outlook.application')
olMAPI=myOlApp.GetNameSpace("MAPI")
if type("myOlApp.Assistant") # 'O'
myFolder.Display()
endif
Myfolder = olMAPI.getdefaultfolder(10) && Contacts
myitems = myfolder.items
myItem= myOlApp.CreateItem(2)
myItem.firstname = 'JOHN'
myItem.lastname = 'DOE'
myItem.Hometelephonenumber = ltrim(rtrim(Contacts->localphone))
myItem.governmentidnumber = ltrim(rtrim(Contacts->ssan))
myItem.save()
I now want to create distribution lists, and am having a very difficult time
doing so. I can use the following code to create the item:
oOutlook = new oleAutoClient("outlook.application")
oItem = oOutlook.createItem(7)
oItem.dlname = 'Empolyees'
oItem.save()
oItem.Display()
Now I can view the distribution list. The problem I am having, is how do I
add the members programatically? The members are in my contacts folder.
Assuming that a contacts first name is 'John' and his last name is 'Doe' How
would he be added? I tried:
oItem.recipients.add = 'DOE, JOHN' but it doesnt work. I also tried:
oItem.AddMembers = 'DOE, JOHN' and I recieve an error stating the object
property is read only. Any help would be appreciated.
Pat