Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to extract Outlook email information from a specific Inbox? 1

Status
Not open for further replies.

freddiekg

Programmer
Oct 13, 2009
25
0
0
MY
I have a need to use VFP to extract Outlook's email from a specific Inbox, e.g. "Archieve". Then, the extracted data will append into a DBF for storage purpose. Can this be done?

Appreciate your help.
 
The following code will give you a start. It will loop through the specified folder, displaying the contents of each message.

Code:
loOut = CreateObject("outlook.application")
lNameSpace = loOut.GetNameSpace("MAPI")
lInBox = lNameSpace.GetDefaultFolder(6)
lArchiveFolder = lInBox.Folders("Archive")

FOR EACH loM IN lArchiveFolder.Items
  ? loM.Subject
  ? loM.SenderName
  ? loM.Body
ENDFOR

I haven't tested this, but it should give you the general idea. You should be able to extend it to store the details in a DBF.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro tips, advice, training, consultancy
Custom software for your business
 
Dear Mike,

Thank you very much for your help.

I have a very important question that need your help:

I am in the process to write a VFP application that use DBC and DBF, and my challenge is the database has to store at the remote server that can access via IP address only at this point. I need your advice as what is the best way I can access the database without performance issues. Like using vfpoledb, ODBC, or using terminal service or etc. Please point me to the right places that I can learn more about this.

Thanks a lot!
 
Freddiekg,

I'm glad I was able to help with your Outlook problem.

Regarding your remote server problem, you've already started a separate thread for that (thread184-1573820). It's not a good idea to duplicate the question in this thread. If any answers were posted here, other forum members would not be able to find them, plus it leads to unnecessary duplication and thread drift.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro tips, advice, training, consultancy
Custom software for your business
 
Dear all,

I was able to extract the Outlook email information into a DBF from the Outlook "Archive" folder, and also able to reproduce the 'email' look alike output without the original formating attributes. It will be cool if I can reproduce the email just like the originals.

Is it possible to create a separate outlook .pst file just to store the archived emails and also put a link into the DBF so that the user can click the record and automatic bring out the outlook with the email display.

Any suggestions?

Thanks in advance.
 
I'm looking for something similar for Access. I need to be able to set the folder to a specific folder that is not the default. I have Access code that will open the default folder and code that will open a folder selected through the pickfolder routine, but I need to automate the system and have it automatically go to the correct Outlook folder from an Access database.
Any sugggestions would be helpful and appreciated.
Note: it is Office 2007.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top