Solved

Complete Folderpath of Outlook Email

Posted on 2012-03-30
6
526 Views
Last Modified: 2012-03-31
Hi Team,

I tried to search the topic of capturing the complete folder path of the eamils coming up in Outlook, but was not able to find any.

Can someone help me with the same.  What I want to achive is to capture the complete folder path of emails in VBA and then use the same later to open the emails from those paths.

Thanks,
Sandesh.
0
Comment
Question by:Sandesh555
  • 4
  • 2
6 Comments
 
LVL 59

Expert Comment

by:Chris Bottomley
Comment Utility
Can you explain what you mean by mails coming up ... i.e. when you open an email when you run some code or some particular explanation?

Chris
0
 

Author Comment

by:Sandesh555
Comment Utility
Hi,

I want to get the complete folder path of the emails in the Inbox.  I have unlimited storage in my Inbox folder so I never move my emails out of this folder.

Now using VBA I want to get the complete folder path and store in an Access database.  Later to be used to open the emails again using VBA.

I hope this answers your question.

Thanks,
Sandesh.
0
 
LVL 59

Accepted Solution

by:
Chris Bottomley earned 500 total points
Comment Utility
The folder path is:
pstname\Inbox

from
?application.Session.GetDefaultFolder(olFolderInbox).FolderPath

If you are thinking it a DOS folder then you are mistaken.  It is a 'component' within the PST which is MS proprietary.  If you are already aware of this then you may not know that if for a given item you record the entryid for the item in access then you can access the item directly anywhere in VBA\\

Within outlook
?application.ActiveExplorer.Selection(1).entryid
00000000A6B27C64927F1E45934E9F5F3C971BE5C45A2000

IN any VBA application and assuming olkApp points to outlook:
?olkapp.Session.GetItemFromID("00000000A6B27C64927F1E45934E9F5F3C971BE5C45A2000").subject
dbms

Chris
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 59

Expert Comment

by:Chris Bottomley
Comment Utility
IF I have the wrong idea still then sorry but can you suggest anything to help narrow in on your needs?

Chris
0
 

Author Comment

by:Sandesh555
Comment Utility
Thanks a lot... It is now working... :)
0
 
LVL 59

Expert Comment

by:Chris Bottomley
Comment Utility
As an aside, if you check the help it is common practice to explain anything other than 'excellent' as a grade

IN essence as here, unless further question specific clarification is requested and not given then it is not considered good form to mark down the solution since without further knowledge of a deficiency how can the expert help.  

The idea (I believe) is to grade the solution and noting that the grading does not affect your points availability but does help guide others with the same problem then consider if you were (someone else) looking for exactly this same problem would you naturally prefer a second rate 'good' solution over an excellent?

Note my intent here is not to change what has happened but to improve your future relationship with the experts and to try and maintain the overall quality of the solutions in the site since I use it a lot myself in areas where I am less competent.

Please know I am glad to have helped in this instance and I wish you a pleasant experience with the site

Chris
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Outlook Free & Paid Tools
Following basic email etiquette rules will help you write a professional email and achieve a good, lasting impression with your contacts.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now