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

VBScript Create & Name a .pst



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old September 18th 06, 07:34 PM posted to microsoft.public.outlook.program_vba
[email protected]
external usenet poster
 
Posts: 1
Default VBScript Create & Name a .pst

It's easy to create a pst using this code:

Dim objOutlook, objNameSpace

Set objOutlook = CreateObject("Outlook.Application")
Set objNameSpace = objOutlook.GetNamespace("MAPI")
objNameSpace.AddStore pstfileName
Set objNameSpace = Nothing
Set objOutlook = Nothing

How I can set it's display name instead of it choosing the default
("Personal Folders") when creating it?

  #2  
Old September 18th 06, 07:54 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default VBScript Create & Name a .pst

See http://www.outlookcode.com/codedetail.aspx?id=962 for a code sample.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

wrote in message oups.com...
It's easy to create a pst using this code:

Dim objOutlook, objNameSpace

Set objOutlook = CreateObject("Outlook.Application")
Set objNameSpace = objOutlook.GetNamespace("MAPI")
objNameSpace.AddStore pstfileName
Set objNameSpace = Nothing
Set objOutlook = Nothing

How I can set it's display name instead of it choosing the default
("Personal Folders") when creating it?

 




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
How do I create a new pst file? GeeWhizz10 Outlook - Installation 2 August 23rd 06 06:02 PM
Create new pst file and copy folders sck10 Outlook and VBA 1 June 13th 06 05:11 PM
Outlook should allow me to create & share more than one calendar. Mitigation Elf Outlook - Calandaring 1 April 13th 06 12:38 AM
How do you create a f/u & att'ch an email note to use in calendar Vivo Outlook - Calandaring 2 March 29th 06 01:21 PM
Why can't I get a CONTACTS folder when I create a new .PST JohnPod Outlook - Using Contacts 4 January 30th 06 06:02 PM


All times are GMT +1. The time now is 08:31 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.