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 » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

how to (re)set the default data file for Outlook in a VB program



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old January 25th 10, 04:16 AM posted to microsoft.public.outlook.program_addins
ron podl
external usenet poster
 
Posts: 4
Default how to (re)set the default data file for Outlook in a VB program

I want to be able to (re)set the default data file for Outlook 2007 in a VB
program (using Visual Studio 2008).
I would like to recognize which Store is the "default data file" and switch
the default to different file.
I'm assuming that, as the Outlook dialogs do, you can't remove the default
store until a new default is set.
See rough program outline.

For Each s as Store In outlookNS.Stores
dim NewName as String = appdata & "\" & Path.GetFileName(s.FilePath)
copy the original Store file to a new location (NewName)
outlookNS.AddStore(NewName)
if s.? is default data file then ' how can I find if it is the default?
find the store just added
make it the default data file ' how to set it?
end if
outlookNS.RemoveStore(s.GetRootFolder)
Next
Ads
  #2  
Old January 25th 10, 02:07 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default how to (re)set the default data file for Outlook in a VB program

I don't know any way to do what you want using the Outlook object model.
Maybe using Extended MAPI and C++ or Delphi, but definitely not with VB and
the Outlook object model. My guess, which Dmitry can confirm, is that you'd
need to work with the IProfAdmin interfaces.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"ron podl" wrote in message
...
I want to be able to (re)set the default data file for Outlook 2007 in a VB
program (using Visual Studio 2008).
I would like to recognize which Store is the "default data file" and
switch
the default to different file.
I'm assuming that, as the Outlook dialogs do, you can't remove the default
store until a new default is set.
See rough program outline.

For Each s as Store In outlookNS.Stores
dim NewName as String = appdata & "\" & Path.GetFileName(s.FilePath)
copy the original Store file to a new location (NewName)
outlookNS.AddStore(NewName)
if s.? is default data file then ' how can I find if it is the default?
find the store just added
make it the default data file ' how to set it?
end if
outlookNS.RemoveStore(s.GetRootFolder)
Next


  #3  
Old January 25th 10, 06:29 PM posted to microsoft.public.outlook.program_addins
ron podl
external usenet poster
 
Posts: 4
Default how to (re)set the default data file for Outlook in a VB progr

Thanks.
I did find this, http://msdn.microsoft.com/en-us/library/bb176395.aspx, this
morning, which talks about getting & setting properties not explicity exposed
in the outlook object model. Doesn't seem to be much information about the
available SchemaNames/namespaces for any of the non-item objects:
AddressEntry, AddressList, Attachment, ExchangeDistributionList,
ExchangeUser, Folder, Recipient, and Store.

ron


"Ken Slovak - [MVP - Outlook]" wrote:

I don't know any way to do what you want using the Outlook object model.
Maybe using Extended MAPI and C++ or Delphi, but definitely not with VB and
the Outlook object model. My guess, which Dmitry can confirm, is that you'd
need to work with the IProfAdmin interfaces.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"ron podl" wrote in message
...
I want to be able to (re)set the default data file for Outlook 2007 in a VB
program (using Visual Studio 2008).
I would like to recognize which Store is the "default data file" and
switch
the default to different file.
I'm assuming that, as the Outlook dialogs do, you can't remove the default
store until a new default is set.
See rough program outline.

For Each s as Store In outlookNS.Stores
dim NewName as String = appdata & "\" & Path.GetFileName(s.FilePath)
copy the original Store file to a new location (NewName)
outlookNS.AddStore(NewName)
if s.? is default data file then ' how can I find if it is the default?
find the store just added
make it the default data file ' how to set it?
end if
outlookNS.RemoveStore(s.GetRootFolder)
Next


.

 




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
Default Data File Location Clue Less Outlook - General Queries 3 February 2nd 08 08:10 PM
Default Data File - Exchange Mailbox vs. PST MS Poster Outlook - General Queries 1 October 1st 07 06:52 PM
Outlook file translators stuck on a default data file or not worki Charles griffiths Outlook - Using Contacts 2 April 23rd 07 11:50 AM
Error setting Data File to default in Outlook 2007 jhunter Outlook - Installation 0 August 9th 06 04:56 AM
Unable to Set Default Data File for Use with Outlook 2007 Marc Joffe Outlook - Installation 2 June 19th 06 02:08 AM


All times are GMT +1. The time now is 08:37 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-2025 Outlook Banter.
The comments are property of their posters.