Outlook\MAPI message copy using EntryID

S

SYM

I would like to do the following using Access VBA and would appreciate any
guidance.

Say I have a PST C:\Source.pst with 1000 messages, 500 in FOLDER_A and 500
in FOLDER_B. I have a list of 500 EntryIDs in an Access table named
TblEntryIDs (250 from each folder) in a field named SourceEntryIDs. I would
like have access connect to the source PST, create a new PST called
C:\Destination.PST and then cycle through my access table looking up each
entryID, finding it in the source pst, creating the folder structure in the
destination PST and copying the message to it and writing the copied EntryID
to a field in TblEntryIDs named DestinationEntryID.

Any assistance is appreciated.
 
D

David H

You'll want to post this in the OUTLOOK newsgroup as they'll be able to walk
you through looping through items in a folder and copying them. The Access
side is a simple loop through the underlying table.

Also, [and quite importantly] an item's EntryId can change is *not* a
reliable means to locate a message. If the item is move using Outlook, the
EntryId in the database will no longer be valid. You can, however, create a
custom user property to store a primary key from the database and then use
the primary key to locate the message.

http://www.granite.ab.ca/access/email/recordsetloop.htm
http://www.outlookcode.com/codedetail.aspx?id=646
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top