[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 267
  • Last Modified:

How do I run this existing VBA procedure to re-link Journal Items to Contacts?

I have several thousand journal items that have been manually linked to contacts in a folder. I  imported those journal items into another folder (which contains identical contacts) and need to relink them.

There is existing VBA code  by Sue Mosher at http://www.outlookcode.com/codedetail.aspx?id=1519 which says:
 "Run this VBA procedure to replace a non-functioning link in the Links collection with a new link to the contact with the same name in the Contacts folder."

I believe this code may do the job (based on comments to the post) but, although very computer literate, I am NOT a programmer and do not know how to implement this VBA procedure.  Would like someone to explain how to do this.
Thanks.

 
0
japple1
Asked:
japple1
  • 2
  • 2
1 Solution
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
You'd need to open the VBA Editor in Outlook (Tools - Macros - Visual Basic Editor), then add a Module (Insert - Module). Copy/paste the code at the link provided (note there is a fix in the comment section below the code), then Save the file (make sure to name your module something like "basRoutines"). Now, click View - Immediate, and type this in the Immediate window:

Call FixContactLinks

and press the Enter key. The code should run, or you may get an error message if something is amiss. If the code seems to run, and you don't get any error messages, then check your journal items to see if they're linked.

Note also that performing tasks like this is non-reversible. I would strongly encourage you to make a full Outlook backup before proceeding.
0
 
japple1Author Commented:
LSMConsulting - Thanks for your quick reply. I followed your instructions and the links do not get changed. Per the comments, I added a breakpoint at the "For Each" statement, then pressed F8 to step thru the code and see the following happen:

When I run this against the Journal Folder, excecution jumps from the "If objItem.Class = olContact Then" the execution jumps to an End statement, presumably because the object is not a Contact. When I run it against the Contacts folder, at the "IF intCount > 0", execution jumps to the EndIf, so none of the linking code is executing, but I'm not sure what that is telling me. [like I said, I'm not a programmer]  I don't get any error messages, it just iterates and then finishes. Which folder should this be running against to establish the links between the contact and journal item?

Also, I pasted the "Debug.Print objItem.Subject, objItem.Links.Count" above the ForEach but nothing is appearinging in the Immediate Window as the comments would suggest.

Any ideas?
0
 
Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
So the code is running, but it's just not working. I'm not fluent enough with Outlook to be able to rework it for you reliably, so I'd suggest you use the Request Attention link (near your original question text) to ask the Moderators to send out a Call for Experts.
0
 
japple1Author Commented:
LSM:
I'll accept your solution since you guided me through the process of at least trying to run it. It isn't your fault the code didn't work. I believe I have found a commercial program that will resolve the issue. It's expensive but it does many other cool things with Outlook data so I should get a lot of utility out of it. Thanks!
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now