Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Outlook and VBA (http://www.outlookbanter.com/outlook-vba/)
-   -   New Outlook Distribution List Location (http://www.outlookbanter.com/outlook-vba/100687-new-outlook-distribution-list-location.html)

scottb2 March 4th 10 10:26 PM

New Outlook Distribution List Location
 

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


Ken Slovak - [MVP - Outlook] March 4th 10 10:59 PM

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



scottb2 March 5th 10 10:29 PM

New Outlook Distribution List Location
 

Works great! Thanks, Ken.

'Ken Slovak - [MVP - Outlook Wrote:
;129796']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



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



All times are GMT +1. The time now is 09:37 AM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com