View Single Post
  #2  
Old March 4th 10, 10:59 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default New Outlook Distribution List Location

DistListItem.SaveAs(fld.FullFolderPath, Outlook.OlSaveAsType.olTXT) will
attempt to save that DL as a text file in the file system at the path you're
providing.

If the folder is a contacts folder use
folder.Items.Add(olDistributionListItem) where folder is your folder. The
function will return a DL object.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"scottb2" scottb2.47bjfy@invalid wrote in message
news:scottb2.47bjfy@invalid...

I have a folder hierarchy as follows:

Public folders
..All Public Folders
.....Dept
........Distribution List

How do I create an Outlook Distribution List in a folder other than the
default "Contacts" folder ("Distribution List")? I have a folder object
with the FullFolderPath where I want the DL to be saved, but
DistListItem.SaveAs(fld.FullFolderPath, Outlook.OlSaveAsType.olTXT)
gives me an error {"The operation failed."}. I can start Outlook and
manually get to the DL folder, though.

Thanks,
Scott


--
scottb2
http://forums.slipstick.com


Ads