Qn from from someone new to Outlook Forms

R

russeller

Hi there
I think this is a Forms type query. I'd be really grateful if someone could
explain to me in basic language(!!) how to do the following:
I want to add another "Subject:" header to new emails in my Outlook 2007, to
sit below the current "Subject:" header. Ideally slightly indented so it
looks like a sub-header of the main subject.....
Any help would be gratefully received.
Thanks, Stephanie
 
K

Ken Slovak - [MVP - Outlook]

Do you want this field to just show up as a textbox control on the email
form, or do you actually want that property value to be added to the
Internet headers of outgoing emails?

For the addition and placement of the textbox on the email form the best
place to go for information is the forms pages at www.outlookcode.com. That
site has lots of information on customizing forms and publishing custom
forms. In the most simple terms you would add a textbox to the form in
design mode, bind the control to a user property so the value is preserved
and publish the form so it can be used.

To actually add the new property value to the outgoing Internet headers you
must add the property value as a MAPI property tag using a specific format
and using code. The code would have to be in the form and to run in the Send
event handler for the form code. It would look something like this:

Dim sTag
sTag =
"http://schemas.microsoft.com/mapi/string/{00020386-0000-0000-C000-000000000046}/Subheader"

That would be one long string where "Subheader" is the name of your new
subheader property.

Then the rest of the code would look like this:

Dim oPropertyAccessor
Set oPropertyAccessor = Item.PropertyAccessor
oPropertyAccessor.SetProperty sTag, value
Item.Save

In this case "value" is the value of the subheader control in the custom
form. The MAPI property you add using that namespace will become an Internet
header line when the email is sent.
 

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