Linking Contact to Contact is broken

S

Stephen Morgan

Hi everyone,
Using Outlook 2003, I've designed my own Contacts page, but have created
a problem. When I make a new contact, and link it to an existing contact
in the bottom left-hand corner of my form, the links work, yet with
existing forms, if I press the existing contacts name, I get "Cannot
perform the requested operation. The command selected is not valid for
this recipient". More annoying, the links work on some contacts and not
others!
Any ideas what I have done, and how to fix it?
 
S

Sue Mosher [MVP-Outlook]

You mean existing items, not existing forms, right? Forms are the UI/code templates. They contain no data.

Did you recently move your .pst file?

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
S

Stephen Morgan

Sue said:
You mean existing items, not existing forms, right? Forms are the UI/code templates. They contain no data.

Did you recently move your .pst file?
Yes, I do mean items, and no I have not moved my .pst file. I can
manually check all the linked items, and re-create, but that will be a
pain as I have a few hundred of them!
Any further ideas please?
 
S

Sue Mosher [MVP-Outlook]

See if the VBA procedure at http://www.outlookcode.com/codedetail.aspx?id=1519 helps you reconnect the links. If you're new to Outlook VBA, see http://www.outlookcode.com/d/vbabasics.htm for basics.

If the linked contacts are in a folder other than your default Contacts folder, you will have to adapt the script to search in that specific folder or folders. The posted sample searches only the user's default Contacts folder.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers


Stephen Morgan said:
Yes, I do mean items, and no I have not moved my .pst file. I can
manually check all the linked items, and re-create, but that will be a
pain as I have a few hundred of them!
Any further ideas please?
 
S

Stephen Morgan

Sue said:
See if the VBA procedure at http://www.outlookcode.com/codedetail.aspx?id=1519 helps you reconnect the links. If you're new to Outlook VBA, see http://www.outlookcode.com/d/vbabasics.htm for basics.

If the linked contacts are in a folder other than your default Contacts folder, you will have to adapt the script to search in that specific folder or folders. The posted sample searches only the user's default Contacts folder.
Thanks for the "Hello World" test macro - it worked. There is a problem
with the other macro, and am not sure how to debug. I get "Compile
error: Sub or Function not defined" and it highlights the word "quote"
in this line of your macro when I run it...

"strFind = "[FullName] = " & Quote(objLink.Name)"

Could/would you please look at your code, and fix, please???
 
S

Sue Mosher [MVP-Outlook]

Sorry. I forgot to include the Quote() function, which is simply:

Function Quote(val) as String
Quote = Chr(34) & CStr(val) & Chr(34)
End Function

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers


Stephen Morgan said:
Sue said:
See if the VBA procedure at http://www.outlookcode.com/codedetail.aspx?id=1519 helps you reconnect the links. If you're new to Outlook VBA, see http://www.outlookcode.com/d/vbabasics.htm for basics.

If the linked contacts are in a folder other than your default Contacts folder, you will have to adapt the script to search in that specific folder or folders. The posted sample searches only the user's default Contacts folder.
Thanks for the "Hello World" test macro - it worked. There is a problem
with the other macro, and am not sure how to debug. I get "Compile
error: Sub or Function not defined" and it highlights the word "quote"
in this line of your macro when I run it...

"strFind = "[FullName] = " & Quote(objLink.Name)"

Could/would you please look at your code, and fix, please???
 
S

Stephen Morgan

Sue said:
Sorry. I forgot to include the Quote() function, which is simply:

Function Quote(val) as String
Quote = Chr(34) & CStr(val) & Chr(34)
End Function
I think we are getting close, but you will have to give me a tiny bit
more information - where do I insert that extra code? In the body of
that existing code, and if so where? It was not obvious to me - sorry!
I'm not a VBA Guru like you, so please have patience with me!!!
 
S

Sue Mosher [MVP-Outlook]

Put all the code in the same VBA code module.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
S

Stephen Morgan

Sue said:
Put all the code in the same VBA code module.
Sue,
Thanks for the hint, but I cannot determine EXACTLY where I should be
copying the second piece of code. Should it ALL be in
"ThisOutlookSession" or in "Module1"? Should the second piece of code be
embedded inside the first lines of code? If so, where?
As you can gather, it's not yet fixed. Any further help greatfully
accepted, but if one more shot does not work, I'll revert to doing it by
hand.
 
S

Sue Mosher [MVP-Outlook]

It doesn't matter which module you put the code in. They are two separate procedures. One needs to follow another. THe order doesn't matter.

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
S

Stephen Morgan

Sue said:
It doesn't matter which module you put the code in. They are two separate procedures. One needs to follow another. THe order doesn't matter.
Sorry to sound defeatist, but your macro just doesn't cut it for me. It
has not fixed the problem, so I'll re-create the links by hand. Thanks
for you efforts,
Stephen
 

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