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

Get folder path where an account stores messages



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old August 26th 09, 08:51 PM posted to microsoft.public.outlook.program_addins
Kamran A
external usenet poster
 
Posts: 3
Default Get folder path where an account stores messages

This is my first time developing an add-in for Outlook 2007. I have
successfully been able to retrieve accounts and successfully been able to
retrieve stores.

However, I see no way to correlate the two. My goal is to find what path (or
store) the account is using to store messages in. I see no property on a
store to get an account and see no property to get a store on account.

Is there any way to do this? In the GUI it's easy enough! Is it a rule or
something? How would I find it?

Thanks for any help!
  #2  
Old August 26th 09, 09:46 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Get folder path where an account stores messages

An email account doesn't have a mail store associated with it, an Outlook
profile has both accounts and one or more mail stores associated with it.

By default anything you send from any account in a profile ends up in your
default mail store for that profile.

There is a hot fix available that lets the Sent Items folder of a
non-default Exchange mailbox get items sent using the email address for that
non-default Exchange mailbox, instead of the items going to Sent Items in
the default store. That's controlled by a registry setting, but it doesn't
apply to PST files, only to Exchange mailboxes.

You can get the sending address of the item from the
MailItem.SendUsingAccount property. That might help you determine where to
route things if that's your goal.

--
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


"Kamran A" wrote in message
...
This is my first time developing an add-in for Outlook 2007. I have
successfully been able to retrieve accounts and successfully been able to
retrieve stores.

However, I see no way to correlate the two. My goal is to find what path
(or
store) the account is using to store messages in. I see no property on a
store to get an account and see no property to get a store on account.

Is there any way to do this? In the GUI it's easy enough! Is it a rule or
something? How would I find it?

Thanks for any help!


  #3  
Old August 27th 09, 06:06 PM posted to microsoft.public.outlook.program_addins
Kamran A
external usenet poster
 
Posts: 3
Default Get folder path where an account stores messages

Hi Ken, thanks for the information.

My ultimate goal for this add-in is to automatically determine what account
to send from for composing new mail based on the current folder selected.
This is a user experience feature missing from Outlook (that Thunderbird does
automatically).

The only obstacle is getting the mail delivery location associated with an
email account (shown in the GUI). The add-in works fine if I hard code the
path-to-account information, but of course that is not ideal.

The other viable option is to match root folder names with account display
names and that is something I'd like to avoid.

Is there any way to do what I'm talking about?

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

An email account doesn't have a mail store associated with it, an Outlook
profile has both accounts and one or more mail stores associated with it.

By default anything you send from any account in a profile ends up in your
default mail store for that profile.

There is a hot fix available that lets the Sent Items folder of a
non-default Exchange mailbox get items sent using the email address for that
non-default Exchange mailbox, instead of the items going to Sent Items in
the default store. That's controlled by a registry setting, but it doesn't
apply to PST files, only to Exchange mailboxes.

You can get the sending address of the item from the
MailItem.SendUsingAccount property. That might help you determine where to
route things if that's your goal.

--
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


"Kamran A" wrote in message
...
This is my first time developing an add-in for Outlook 2007. I have
successfully been able to retrieve accounts and successfully been able to
retrieve stores.

However, I see no way to correlate the two. My goal is to find what path
(or
store) the account is using to store messages in. I see no property on a
store to get an account and see no property to get a store on account.

Is there any way to do this? In the GUI it's easy enough! Is it a rule or
something? How would I find it?

Thanks for any help!



  #4  
Old August 28th 09, 02:22 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Get folder path where an account stores messages

Like I said, an email account is not tied to a store (other than with
Exchange mailboxes). If you have an Exchange mailbox or even a public folder
you can get the email address for that store and if you have permissions you
can send using that account.

If you have POP3 accounts how could those be tied to a store? A PST file can
be opened exclusively by anyone with access to it with no limitations. So I
could open it in one profile that has 3 mail accounts and then in another
profile that has a different 3 accounts. How do you distinguish?

I think your design is fundamentally flawed due to this misunderstanding
about the relationships between mail stores, profiles and email accounts.
All you can do is get the accounts for that profile (Outlook session) and
then guess.

--
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


"Kamran A" wrote in message
news
Hi Ken, thanks for the information.

My ultimate goal for this add-in is to automatically determine what
account
to send from for composing new mail based on the current folder selected.
This is a user experience feature missing from Outlook (that Thunderbird
does
automatically).

The only obstacle is getting the mail delivery location associated with an
email account (shown in the GUI). The add-in works fine if I hard code the
path-to-account information, but of course that is not ideal.

The other viable option is to match root folder names with account display
names and that is something I'd like to avoid.

Is there any way to do what I'm talking about?


  #5  
Old August 28th 09, 03:51 PM posted to microsoft.public.outlook.program_addins
Kamran A
external usenet poster
 
Posts: 3
Default Get folder path where an account stores messages

I think it makes more sense if I can show you what I want:

http://farm3.static.flickr.com/2555/...7374ac08_o.gif

Outlook must store this information somewhere, all I really care about is
how to get it. If it's possible, my job is done, otherwise I will need to
make a hack.

Thanks for your help!

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

Like I said, an email account is not tied to a store (other than with
Exchange mailboxes). If you have an Exchange mailbox or even a public folder
you can get the email address for that store and if you have permissions you
can send using that account.

If you have POP3 accounts how could those be tied to a store? A PST file can
be opened exclusively by anyone with access to it with no limitations. So I
could open it in one profile that has 3 mail accounts and then in another
profile that has a different 3 accounts. How do you distinguish?

I think your design is fundamentally flawed due to this misunderstanding
about the relationships between mail stores, profiles and email accounts.
All you can do is get the accounts for that profile (Outlook session) and
then guess.

--
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


"Kamran A" wrote in message
news
Hi Ken, thanks for the information.

My ultimate goal for this add-in is to automatically determine what
account
to send from for composing new mail based on the current folder selected.
This is a user experience feature missing from Outlook (that Thunderbird
does
automatically).

The only obstacle is getting the mail delivery location associated with an
email account (shown in the GUI). The add-in works fine if I hard code the
path-to-account information, but of course that is not ideal.

The other viable option is to match root folder names with account display
names and that is something I'd like to avoid.

Is there any way to do what I'm talking about?



  #6  
Old August 28th 09, 10:19 PM posted to microsoft.public.outlook.program_addins
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Get folder path where an account stores messages

But if you have 3 different mailboxes or PST files loaded that will only
tell you what the Accounts collection tells you in Outlook 2007.

It does not tell you which account or accounts are associated with a
particular mail store, if there is any such association at all (there only
is with Exchange mailboxes or public folders). PST files have no email
account association at all.

Also, I can send as Sales or Support or Webmaster or various other email
accounts (mailboxes) in my domain, in addition to my own email address.
Those mailboxes may or may not be loaded in my Outlook session at all.

--
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


"Kamran A" wrote in message
...
I think it makes more sense if I can show you what I want:

http://farm3.static.flickr.com/2555/...7374ac08_o.gif

Outlook must store this information somewhere, all I really care about is
how to get it. If it's possible, my job is done, otherwise I will need to
make a hack.

Thanks for your help!


 




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
Script w/relative path that sends absolute path to a folder to theclipboard? [email protected] Outlook and VBA 3 March 24th 09 01:32 PM
dbx Folder Stores missing in Outlook Express Mayhan Outlook Express 2 January 24th 07 04:16 AM
Saving email messages with path Catalin Outlook and VBA 1 November 1st 06 05:53 AM
Path to Messages rogeepete Outlook Express 7 October 10th 06 09:54 PM
Sent messages in POP account are being saved in sent folder of Exc DJHouse Outlook - Installation 3 January 13th 06 05:11 PM


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