Retrieving CompanyName info from a Contact

C

Chuck

I have been creating a custom form in Outlook 2000. I
use an Outlook CommandButton to pick the customer from a
Contacts folder in Public Folders and populate the
_RecipientControl1 test box. While that works fine, I
cannot seem to get associated information (in this case,
simply the Company) onto my custom form.

I am using a custom form built from the Post form in OL2k.
I am prepared to write code, mostly from Sue Mosher's
excellent 'jumpstart', but simply do not know if this is a
job for VBScript or VBA...and I keep getting caught in the
trap of trying the same things over and over and expecting
different results...

Thanks,
Chuck
 
S

Sue Mosher [MVP]

You'll have to tell us more. Are you adding a Contacts button/text box to the post form? Or are you using the To, Cc, Bcc controls?

Form code is always VBScript, BTW.
--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 
C

chuck

Hi,

Actually, neither. What I had been trying to do was to
capture the CompanyName from a Contact that was added to a
customized Post item using a button that created a LINK.
My problem was trying to reference the field that was
created when I added the Command button that was presented
as a Contact item from the field chooser. So I revisited
the Linking Outlook Items section in my favorite Outlook
book and found success. I used a Sub CompName() routine
and ran it as a macro. Now all I need to figure out is how
to get it published...

-----Original Message-----
You'll have to tell us more. Are you adding a Contacts
button/text box to the post form? Or are you using the To,
Cc, Bcc controls?
 
S

Sue Mosher [MVP]

So you're using the Contacts controls to add to the Links collection? I'd suggest that you incorporate your code into the Item_Write event handler for your post form. You can loop through the Links collection and collect the data you need to update a custom property on your form to hold the information.
--
Sue Mosher, Outlook MVP
Outlook and Exchange solutions at http://www.slipstick.com
Author of
Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
 
C

Chuck

Sue,

You are so right! I did use the Item_PropertyChange
instead, but it works now for all of my users and they are
excited about it! Thanks for your insight and your
wonderful book, Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers!!

-----Original Message-----
So you're using the Contacts controls to add to the Links
collection? I'd suggest that you incorporate your code
into the Item_Write event handler for your post form. You
can loop through the Links collection and collect the data
you need to update a custom property on your form to hold
the information.
 

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