WPCubed Product Support

Address labels & mailmerge

What is the best way to mark an address block in a letter so that I can pick it up as the address as part of a mail merge operation?

I've had a look at the label demo but probably won't be able to use that as some people will want to use the mail merge templates to print their letter head so I can't rely on the recipients address being the first thing on the letter.

#1 ♥ 0
6.3k Views 2 users read 3 min
support

Hi,

If you use a merge field You can have the address anywhere in the text. Using a table you can create a frame around the address.

Julian

#2 ♥ 0

Julian

I will be using merge fields to create the address block, but I have no way of knowing which bit of text it is (even if its in a table). Is there something that can be used to pick out a specific block of text from a document AFTER the mail merge has been carried out. Its possible that the address block could contain some text that has been typed in directly (eg Private & Confidential) as well the merged fields

Roy

#3 ♥ 0
support

Hi,

After the mail-merge the fields are still existent. You can merge again or read out possible changes to the data. That all can be done in even OnMailMergeGetText. Use Contents.OldFormattedText to read out the text.

Julian

#4 ♥ 0

I already use that feature to create mailshot letters and eShots (ie emailshots) but as I said above there may be user entered text (ie not mergefields), and the address may not be the first thing in the letter.

My system allows users to specify the merge fields they want to use so I can't just pick up on the basis of certain merge fields. I don't want a separate document because that could lead to different addresses on the letter and label.

I suppose what I'm looking for is something like the textbox in Word as long as it can have mailmerge fields.

#5 ♥ 0
support

Hi,

The textboxes in WPTools Premium can contain merge fields.

Julian

#6 ♥ 0

Julian

Thanks for the info, but as a hobby programmer that's out of my price range.

Looking through your demos I eventually decided to wrap the address in a bookmark. Works nicely. My next stage is to pretty up the label dimension part of your label demo to match the general look and appearance of my app.

Roy

#7 ♥ 0
support

Hi,

Bookmarks are good - they can be used like merge fields.

Note the method MergeTextEx which was added to WPTools 6.

Here You can specify the object type to work with wpobjBookmark instead of wpobjMergeField.

#8 ♥ 0
This category is archived. No new posts are possible.