Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to create a new outlook folder? 1

Status
Not open for further replies.

longda

Programmer
Jul 24, 2001
66
US
I have searched the forums and found how to access the folders that are currently in outlook. I can not however find anything that states how to create a new outlook folder through VFP if this is at all possible. I just need a generic example of how to add a folder to an existing public folder in outlook. Any help is greatly apprectiated.

Thanks
Dave L.
 
According to the October 2000 issue of Foxpro Advisor, the method you want is called FolderAdd. It is a method of the Folders collection. There isn't any example of usage in the article however.

Hope this helps.



Mike Krausnick
Dublin, California
 
Dave L.

This might help

Code:
Local oOutlook,oNameSpace,oNewFolder
oOutlook=CREATEOBJECT("outlook.application")
oNameSpace=oOutlook.GetNamespace("mapi")
oNameSpace.Folders(2).Folders.Add("myNewFolder")



Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Mike,

Thanks again for your help. I gave you a star because this was exactly what I needed. This worked perfectly.

Dave L.
 
Dave L.

Glad it helped you. Thanks for the star.

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top