Populating subject with data from fields in form

G

Gren

Hullo,

My grasp of VB is well, crappy at best. Please bear with me. I'm
looking to pull a value from my form into the subject line.

For example, the field 'Last Name:' a user would type 'Smith'

I want 'Smith' to be put in the subject line automatically.


any help would be hugely appreciated!

-Drew
 
S

Sue Mosher [MVP-Outlook]

What's the application environment? In other words, is this a VB project? An
Outlook custom form? IF a form, what kind?
 
G

Gren

It's not a VB project, I'm building it in Outlook with the 'design
form' utility.

The form is a client add/change sheet; users will submit a form
populated with a third party's demographic data. i.e. name, street
address, town, etc.
The person sending the email to me is NOT the client who's data is in
the form... I wanted the person's who's data is in the form to be
populated in the subject field (last name, first name) after an
initial static comment.

Example: Subject: Client Add/Change : Jones, Sarah

'Jones, Sarah' being pulled from form.
 
S

Sue Mosher [MVP-Outlook]

In a custom form, you can set the subject in the Item_Send event handler for
the form:

Function Item_Send()
Item.Subject = Item.UserProperties("Last Name")
End Function

assuming you have a custom field named "Last Name."

Or, you can use a formula that you apply to the Subject through the Value
tab on the Properties dialog for the control for the Subject field:

[Last Name]
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
G

Guest

Thank you much, Sue.. I used your latter suggestion and it works fantastico.

I just posted another issue I'm really stuck with; the thread title is
'Sending/Recieving Forms'

I really could use your expert advice with this, if you could take a sec and
look at it.

Thanks again!



Sue Mosher said:
In a custom form, you can set the subject in the Item_Send event handler for
the form:

Function Item_Send()
Item.Subject = Item.UserProperties("Last Name")
End Function

assuming you have a custom field named "Last Name."

Or, you can use a formula that you apply to the Subject through the Value
tab on the Properties dialog for the control for the Subject field:

[Last Name]
--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Gren said:
It's not a VB project, I'm building it in Outlook with the 'design
form' utility.

The form is a client add/change sheet; users will submit a form
populated with a third party's demographic data. i.e. name, street
address, town, etc.
The person sending the email to me is NOT the client who's data is in
the form... I wanted the person's who's data is in the form to be
populated in the subject field (last name, first name) after an
initial static comment.

Example: Subject: Client Add/Change : Jones, Sarah

'Jones, Sarah' being pulled from form.
 

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