#1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Miriam C.
 
Posts: n/a
Default Trim text

HI,

I created a MS Word mail merge from an applicaiton (runs on a SQL backend)
to print training certificates.

The course name in the database contains a code infront of the name i.e.
BA10:Novell Networking Foundations. Is there a way to remove the BA10:
portion of the course name so that it only displays Novell Networking
Foundation. I would rather do that then prompting the users to enter course
names with typos...

Many thanks in advance
Miriam
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson
 
Posts: n/a
Default Trim text

There's no way using Word fields.

You can consider:
a. using a view/query in your database to strip off the text you don't
want, then using that as the data source. If you're not in a position to do
that, you could try...
b. using MSQuery to set up the connection to your database (this requires a
suitable ODBC DSN to be on all the user machines. In Word 2002/3, MS Query -
if installed - can be accessed via the Tools menu at the top right of the
Select Data Source dialog box). IN Word 2000/97, there's a button in the
Open Data Source dialog box. MS Query really just creates a query that Word
then uses to open the data source directly. Unfortunately, it doesn't always
get it right and you can find that everything appears to go well until you
attempt the merge. In that case you could try...
c. using Word VBA to call OpenDataSource to issue a SQL query to your
database. I can provide more info. if you are interested, or you may be able
to find my previous articles on this using Google Groups
d. using Word VBA events to extract the necessary string and insert it in
the Mail Merge Main document, once for each record in the data source.
e. "marking" these fields in some way, e.g. putting @@@ in front of each
course name, merging programmatically to a new document, the using
find/replace to strip out the @@@...: strings

Peter Jamieson



"Miriam C." wrote in message
news
HI,

I created a MS Word mail merge from an applicaiton (runs on a SQL backend)
to print training certificates.

The course name in the database contains a code infront of the name i.e.
BA10:Novell Networking Foundations. Is there a way to remove the BA10:
portion of the course name so that it only displays Novell Networking
Foundation. I would rather do that then prompting the users to enter
course
names with typos...

Many thanks in advance
Miriam


Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Header with picture or text box Scott Page Layout 15 April 28th 23 02:52 AM
Creating dynamic cross reference links in a Word document torajudo Microsoft Word Help 5 April 27th 23 08:57 PM
Hidden text won't stick Gary Burton Formatting Long Documents 10 February 17th 06 02:03 AM
Wandering text box Jim K Microsoft Word Help 7 December 23rd 05 11:27 PM
How to select paragraph between tow specified words? ALIOX Microsoft Word Help 1 June 28th 05 08:56 AM


All times are GMT +1. The time now is 12:13 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"