Business Address: Format

J

J.R. Winder

My dev group has developed and addin for Outlook 07 that enables 'Contact'
fields to be merged into MS Word 07 templates. The addin works fine however
the second line within the 'Business Address' field is including a leading
space when merging the field data into the Word template.

This is an example of how the fields are setup in the Template:
<FullName>
<CompanyName>
<BusinessAddressStreet>
<BusinessAddressCity>, <BusinessAddressState> <BusinessAddressPostalCode>

....and this is an example of how the data looks once the fields are merged
into the Word doc:
John Doe
John Does Landscaping
55 Main Street
Unit 4
Portsmouth, NH 03801

To me the logical cause to the leading space is due to there being two
'street' address lines. However the available fields within Outlook
Contact's does not include an <BusinessAddressStreet1> and/or
<BusinessAddressStreet2>

Any thoughts on how to eliminate the leading space?

Thanks
JR
 
K

Ken Slovak - [MVP - Outlook]

In cases like that there's a control character there usually as well as
possibly an actual space. You'd have to examine the text of the
BusinessAddressStreet property. You may find that you can't just blindly put
in the text from those properties but must do some text massaging to get
things the way you want them to look (or live with how they look now).
 
J

J.R. Winder

Thanks Ken-
Do you know of anything I can do within the template that would eliminate
the control character and/or the actual space once the contact fields are
merged?
 
K

Ken Slovak - [MVP - Outlook]

Nothing that I know of just using a template, you'd have to write code for
that.
 

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