concatenate and parse merged field with text

J

Joseph

I need to concatenate the ID from our system into an ID our users use for web
access. The ID in our system is an 11 digit number. The web access ID is the
last 7 digits of that number with a "W" in front.

The extract we get to merge the ID info only contains the system ID. To
derive the web access ID, we need to concatenate a "W" with the last 7 digits
of the system ID. I thought this would be easy to do using Word logic, but
several of us have tried with no luck. We don't want to go to Excel first, as
that adds an extra step our business process.

Any ideas?
 
D

Doug Robbins - Word MVP

I think that the only way that you could do this would be to use a Wildcard
replace after executing the merge with

([0-9]{3})([0-9]{8})

in the Find what control and

W\2

in the replace with control.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
J

Joseph

Thanks Doug. I was fiddling around with a Word macro, trying to automate the
entire process and your suggestion put us on the right track. Instead of
trying to parse and concatenate each ID as it looped through the merge
process, we inserted find and replace code after the merge. Worked
beautifully, and no extra work necessary!!

Doug Robbins - Word MVP said:
I think that the only way that you could do this would be to use a Wildcard
replace after executing the merge with

([0-9]{3})([0-9]{8})

in the Find what control and

W\2

in the replace with control.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

Joseph said:
I need to concatenate the ID from our system into an ID our users use for
web
access. The ID in our system is an 11 digit number. The web access ID is
the
last 7 digits of that number with a "W" in front.

The extract we get to merge the ID info only contains the system ID. To
derive the web access ID, we need to concatenate a "W" with the last 7
digits
of the system ID. I thought this would be easy to do using Word logic, but
several of us have tried with no luck. We don't want to go to Excel first,
as
that adds an extra step our business process.

Any ideas?
 

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