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

Change VBA Reference from PST to OST File



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old July 18th 06, 04:34 AM posted to microsoft.public.outlook.program_vba
Karl Burrows
external usenet poster
 
Posts: 5
Default Change VBA Reference from PST to OST File

Someone wrote simple code that exports a calendar to a file for reference by
other users. We recently migrated to Exchange and I need to figure out how
to change the code to export the new OST file. Snippet of code is as
follows:

'Set reference to Specified Calendar folder
Set ol = New Outlook.Application
Set olns = ol.GetNamespace("MAPI")
Set MyFolder1 = olns.Folders("Personal Folders")

'Set Calendar Folder Below
Set MyFolder2 = MyFolder1.Folders("CRITICAL DATES CALENDAR")
Set fld = MyFolder2

How do I change this to reference the new outlook.ost file used by Exchange?

Thanks!


  #2  
Old July 18th 06, 02:54 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Change VBA Reference from PST to OST File

Since the OST file would be your default store you can just get the Inbox
folder (NameSpace.GetDefaultFolder(olFolderInbox). It's Parent property
object would be the Mailbox folder you see at the top of the folder list.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm


"Karl Burrows" wrote in message
...
Someone wrote simple code that exports a calendar to a file for reference
by
other users. We recently migrated to Exchange and I need to figure out
how
to change the code to export the new OST file. Snippet of code is as
follows:

'Set reference to Specified Calendar folder
Set ol = New Outlook.Application
Set olns = ol.GetNamespace("MAPI")
Set MyFolder1 = olns.Folders("Personal Folders")

'Set Calendar Folder Below
Set MyFolder2 = MyFolder1.Folders("CRITICAL DATES CALENDAR")
Set fld = MyFolder2

How do I change this to reference the new outlook.ost file used by
Exchange?

Thanks!



 




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
change the cache mode path (.ost file path) bln-ami Outlook - Installation 0 July 18th 06 08:45 AM
ost/pst Mark Outlook - General Queries 3 March 30th 06 09:20 PM
What is the limit of an offline file (.ost file) in Outlook 2003? Bruce H. Outlook - Installation 2 March 26th 06 11:48 PM
Compress PST-File with VBA Heinz-Dieter Janzen Outlook and VBA 1 February 28th 06 04:55 PM
how to change default delivery location to my new pst file sf= Outlook - General Queries 5 February 20th 06 03:18 PM


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