![]() |
| If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|||||||
| Tags: copy, folder, local, public, vba |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
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 |
| Ads |
|
#2
|
|||
|
|||
|
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 |
|
#3
|
|||
|
|||
|
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 |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Copying appointment from local calendar to public folder | MikeH | Outlook - Calandaring | 0 | September 14th 06 05:22 PM |
| How do I copy a contacts folder into one in a public folder | Shona | Outlook - Using Contacts | 4 | September 1st 06 03:15 PM |
| Copy from public contacts to local folder | Cecco | Outlook and VBA | 4 | June 23rd 06 03:49 PM |
| Contact in public folder defaults to local contact folder | Alison | Outlook - Using Contacts | 8 | May 30th 06 05:32 AM |
| Copy useful news to local folder | kei | Outlook Express | 3 | January 21st 06 01:37 AM |