moving items from one folder to another

B

Bruce

How would I test an item, see what type of item it is, move that item to a
folder, making sure not to change the info, and move any attachments.
If it it is a calender item, if it is a repeating item, then move it along
with all of the reating info.


I would also "like" to test to see if the item is a duplicate of any items
already in the destination folder. How would I test for duplicates

Thanks
 
P

Paul Baker

This is very basic Outlook VBA programming. Suggest you buy a good book
like Sue Mosher's Microsoft Outlook Programming. Alternatively, you
could hire a VBA programmer for a day.

To move a mail item to a folder look in the Object Browser for the
MailItem class and the Move method. (If the last sentence made no sense
you definitely need that book!)
 
S

Sue Mosher [MVP]

To check the type of item, use the Class property. To move it to another
folder, including the attachments, use the Move method.

You'd have to devise your own scheme to check for duplicates, looking for
items that match the data in the fields you're interested in. The Items.Find
and .,Restrict methods should be useful.
 
B

Bruce

Been doing VBA in Excel, but just was not sure where to start with OL...
Also have been seeing some posts on memory leak issues so I was just hoping
somebody could give me a little guidance to avoid these types of things.
Looks like doing a for loop and counting from high to low should avoid most
issues...
I also was not sure how to check for dup items and similar, but it looks
like the restrict property is what I need...

I also know that the folders have some "quirky" issues with names etc...
This is where I still am having issues... mainly how to select the
PST/FOLDER I am working with, and changing to another PST. I need to go
through the browser a little more.

As for Sue's book, I would like to get a copy, but have not found it
(atleast locally..)

Thanks
B
 

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