Simple Contact Email to Message Question

E

EvE

Good Day,

I do not do Outlook VbScript programming, but this small task has been
appointed to me.
We have created a custom Message form.
What we would like is for a user to select a contact and then choose
the form off the "Actions" dropdown (as they would "New Message to
Contact") -
the "To" field in the custom message form should then populate with
this selected Contact's email.

Something tells me it should only be a few lines of code. I have
searched everywhere (incl this newsgroup), but can not find the
relevant code!
Also, should I be looking at setting the "Default Value" under
Properties for the "To" field or write Script under the Open event of
the Item?

ANY help would be appreciated.
Regards,
EvE
 
S

Sue Mosher [MVP]

Take a look at the sample form at
http://www.slipstick.com/dev/olforms/contfax.htm . This is very similar to
what you're trying to do, except that it reads the fax number, not the email
address.

To get the property name(s) you need, check the object browser: Press
ALt+F11 to open the VBA environment in Outlook, then press F2.
 
E

EvE ()

Good Day Ms Mosher,

I have followed instructions (and I hope correctly) - if I now select a
contact and open this fax contact form - none of the fields on it
populates (even though my contact has a business fax number).

I have looked at the code and I can not see why it is not working for
me, but its not. Even with the understanding that I need to start an
Action for the event to kick in.

I know that the field I need is email1Address, however, its the
assigment to the "To" field which is the tricky bit.
I can assign to the Subject and Body lines no problem, but the "To"
field does not want to populate.
I have looked at the Recipients collection (not sure I am using it
correctly) and just plainly assigning the "To" field of the item with a
literal string - neither of which works.

Again, any help would be appreciated. I will play around some more with
the example you sent.

Regards,
EvE


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
 
S

Sue Mosher [MVP]

Did you follow the standard procedure for using and testing custom forms and
custom actions -- publish the form to the folder, then create and save a new
contact with the form? You won't see any custom actions until you do that.

Show your modified code if you want comments on it.
 

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