Link to home
Start Free TrialLog in
Avatar of Cluskitt
CluskittFlag for Portugal

asked on

Loop with VBA through Outlook 2007 contacts stored on a different .pst

We have our contacts stored on a separate .pst which has nothing else other than contacts and the default stuff MS places on every pst. This is so we can synchronize out contacts here with a simple copy/paste script.

However, I can't seem to find a way to loop through the contacts using VBA for mass editing. I can loop through the default pst contacts, but those are empty.

Anyone knows how I can achieve this, please?
ASKER CERTIFIED SOLUTION
Avatar of David Lee
David Lee
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Cluskitt

ASKER

I did stumble upon that piece of code, or something similar, but couldn't get it to work properly.

If I use the path (to continue with that example): "Personal Folders\Contacts\Contacts1" I do get an item count. But if I simply use "Personal Folders\Contacts", the item count is 0.

I want to loop all the folders inside contacts. Going through them one by one kinda defeats the purpose.

And yes, you can assume a decent VBA knowledge. :)
Nevermind, got it working. I just had to make create another loop outside the items loop to cycle through the subfolders. Thanks for the help.