Retrieving CompanyName info from a Contact

  • Thread starter Thread starter Chuck
  • Start date Start date
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
 
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
 
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?
 
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
 
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.
 
Back
Top