Get folder path where an account stores messages

  • Thread starter Thread starter Kamran A
  • Start date Start date
Status
Not open for further replies.
K

Kamran A

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

"Kamran A" <KamranA> wrote in message

news:9F1D0FC8-1064-4108-8E65-E7ADAF65C36B@microsoft.com...
> 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!
 
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?
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.

> >

>

> "Kamran A" <KamranA> wrote in message
> news:9F1D0FC8-1064-4108-8E65-E7ADAF65C36B@microsoft.com...
> > 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!


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

"Kamran A" <KamranA> wrote in message

news:DF530F0C-14D7-4669-89D8-CD19BE4A5063@microsoft.com...
> 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?
 
I think it makes more sense if I can show you what I want:

http://farm3.static.flickr.com/2555/3865134862_097374ac08_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!
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.

> >

>

> "Kamran A" <KamranA> wrote in message
> news:DF530F0C-14D7-4669-89D8-CD19BE4A5063@microsoft.com...
> > 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?


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

"Kamran A" <KamranA> wrote in message

news:FF6CDAAB-105A-441D-8111-79B12E17D4D6@microsoft.com...
> I think it makes more sense if I can show you what I want:

> http://farm3.static.flickr.com/2555/3865134862_097374ac08_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!
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
B BCC issues after changing root folder path for gmail Using Outlook 1
G [Help] Converting array to destination folder path Outlook VBA and Custom Forms 1
H "Advanced find: column for full folder path? Using Outlook 1
A Outlook VBA - moving mail item to public folder using variable within path Using Outlook 6
S Script w/relative path that sends absolute path to a folder to theclipboard? Outlook VBA and Custom Forms 3
M Folder names - rich text Using Outlook 6
E Gmail folder -why, in .ost IMAP situation, as well as Googlemail folder? Using Outlook 0
J Saving Send emails to a folder on the server Outlook VBA and Custom Forms 63
J Outlook 2019 Pick the Folder Location to save send emails Outlook VBA and Custom Forms 0
macdotcom Outlook 365 Outlook folder export to PST archival tool - close, but need a nudge Outlook VBA and Custom Forms 2
B How to get PST folder datetime? Outlook VBA and Custom Forms 1
M Search message, then (1) Jump to folder & (2) Select message that you searched for Outlook VBA and Custom Forms 6
G Search Folders and Jump to Folder Outlook VBA and Custom Forms 2
X Run macro automatically when a mail appears in the sent folder Using Outlook 5
P Can't add custom field to custom Outlook form, it always adds to the Folder instead Outlook VBA and Custom Forms 2
P Yahoo/IMAP folder rename by Outlook desktop 365 Using Outlook 0
A Outlook 2019 folder counter Using Outlook 0
A Search folder and move the email Outlook VBA and Custom Forms 0
N Reply to Outlook messages by moving messages to a specific Outlook folder Outlook VBA and Custom Forms 1
T How to find or display the sub-folder name for an Archive Search Using Outlook 10
A Outlook 365 (OutLook For Mac)Move "On My Computer" Folder Items From Old To New Mac Computer Using Outlook 4
P Search folder: all emails sent to or from a domain Using Outlook 1
V Folder Properties - Gmail account can't switch Using Outlook 5
Victor_50 Outlook 2019 Jump to folder from search folder Outlook VBA and Custom Forms 0
HarvMan Outlook 365 - Rule to Move an Incoming Message to Another Folder Using Outlook 4
S Email Macros to go to a SHARED Outlook mailbox Draft folder...NOT my personal Outlook Draft folder Using Outlook 2
I Help with Smart Folder + Query Builder on IMAP Using Outlook 0
S Paperclip icon shows without attachment in email under Sent folder Using Outlook 0
Kika Melo Outlook Calendar deleted appointments not in Deleted Items folder Using Outlook 3
K vba code to auto download email into a specific folder in local hard disk as and when any new email arrives in Inbox/subfolder Outlook VBA and Custom Forms 0
Z Outlook 365 Automatically assign categories to incoming mail in a shared folder Round Robin Outlook VBA and Custom Forms 1
G Adding a contact to a specific folder Using Outlook 0
Witzker Outlook 2019 Macro GoTo user defined search folder Outlook VBA and Custom Forms 6
Rupert Dragwater Duplicate email in Folder Using Outlook 7
S Adding a recipient's column to Sent folder in Outlook 2010 Outlook VBA and Custom Forms 1
L "Insert Pictures" Button-Wrong Folder Using Outlook 5
C Outlook 365 Copy/Save Emails in Folder Outside Outlook to Show Date Sender Recipient Subject in Header Using Outlook 0
CWM330 Outlook 365 Hey Diane! MS 365 Biz Standard and "Potential Spam" addressed to others coming to my JUNK folder? Using Outlook 2
J Quick steps delete original email and move reply/sent email to folder Using Outlook 2
A manual rule sends mail to wrong folder Using Outlook 5
richardwing Auto forward email that is moves into a specific outlook folder Outlook VBA and Custom Forms 5
D This folder up to date vs all folders up to date Using Outlook 1
G Automatically delete messages in the synchronization folder Outlook VBA and Custom Forms 3
wayneame Changing the Form Used by Existing Task Items in a Folder Outlook VBA and Custom Forms 4
S Need code to allow defined starting folder and selection from there to drill down Outlook VBA and Custom Forms 10
P Emails assigned with a certain category (within a shared inbox) to be copied to a specific folder. Outlook VBA and Custom Forms 2
M Saving emails using Visual Basic - Selecting folder with msoFileDialogFolderPicker Outlook VBA and Custom Forms 6
B Search and Find Email by Folder Name Outlook VBA and Custom Forms 2
S Folder Pane Colour Categories Using Outlook 6
Victor.Ayala Automated way to check the option "Show this folder as an email Address Book" Outlook VBA and Custom Forms 2

Similar threads

Back
Top