A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Copy public Folder to Local Folder with VBA



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old September 20th 06, 11:32 AM posted to microsoft.public.outlook.program_vba
Frank Connemann
external usenet poster
 
Posts: 2
Default 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


Ads
  #2  
Old September 21st 06, 09:30 PM posted to microsoft.public.outlook.program_vba
Eric Legault [MVP - Outlook]
external usenet poster
 
Posts: 830
Default 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



  #3  
Old September 22nd 06, 10:08 AM posted to microsoft.public.outlook.program_vba
Frank Connemann
external usenet poster
 
Posts: 2
Default 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





 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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


All times are GMT +1. The time now is 05:34 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.