![]() |
Copy public Folder to Local Folder with VBA
Hello NG
How can i copy with a VBA Skript a Public Task Folder (echange) to der Privat Mailbox (Exchange) Please post me a Code-Sample. thx Frank Connemann |
Copy public Folder to Local Folder with VBA
Make the source public folder the active one and run this macro to copy it
under the Inbox folder in the default Mailbox: Sub CopyFolder() Dim myOlApp As New Outlook.Application Dim myNameSpace As Outlook.NameSpace Dim myInboxFolder As Outlook.MAPIFolder Dim myCurrentFolder As Outlook.MAPIFolder Dim myNewFolder As Outlook.MAPIFolder Set myNameSpace = myOlApp.GetNamespace("MAPI") Set myInboxFolder = myNameSpace.GetDefaultFolder(olFolderInbox) Set myCurrentFolder = myOlApp.ActiveExplorer.CurrentFolder Set myNewFolder = myCurrentFolder.CopyTo(myInboxFolder) End Sub -- Eric Legault (Outlook MVP, MCDBA, MCTS: Messaging & Collaboration) Try Picture Attachments Wizard for Outlook: http://www.collaborativeinnovations.ca Blog: http://blogs.officezealot.com/legault/ "Frank Connemann" wrote: Hello NG How can i copy with a VBA Skript a Public Task Folder (echange) to der Privat Mailbox (Exchange) Please post me a Code-Sample. thx Frank Connemann |
Copy public Folder to Local Folder with VBA
Thanks for your Help
But can i specifi the public Folder in the VBA-Skript?? "Eric Legault [MVP - Outlook]" schrieb im Newsbeitrag ... Make the source public folder the active one and run this macro to copy it under the Inbox folder in the default Mailbox: Sub CopyFolder() Dim myOlApp As New Outlook.Application Dim myNameSpace As Outlook.NameSpace Dim myInboxFolder As Outlook.MAPIFolder Dim myCurrentFolder As Outlook.MAPIFolder Dim myNewFolder As Outlook.MAPIFolder Set myNameSpace = myOlApp.GetNamespace("MAPI") Set myInboxFolder = myNameSpace.GetDefaultFolder(olFolderInbox) Set myCurrentFolder = myOlApp.ActiveExplorer.CurrentFolder Set myNewFolder = myCurrentFolder.CopyTo(myInboxFolder) End Sub -- Eric Legault (Outlook MVP, MCDBA, MCTS: Messaging & Collaboration) Try Picture Attachments Wizard for Outlook: http://www.collaborativeinnovations.ca Blog: http://blogs.officezealot.com/legault/ "Frank Connemann" wrote: Hello NG How can i copy with a VBA Skript a Public Task Folder (echange) to der Privat Mailbox (Exchange) Please post me a Code-Sample. thx Frank Connemann |
All times are GMT +1. The time now is 11:33 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