Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
How to keep Access MergeField from losing formatting in Word 2003
I have an alphanumeric Charge number (text field) formatted with hyphens -
e.g., 21B-2009-01234. If I use that formatted field in MS Word 2003 the hyphens are stripped out. However, if I simply copy and paste into MS Word, the hyphens remain. There doesn't seem to be any "switch" to restore the formatting. Thank you. |
#2
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
How to keep Access MergeField from losing formatting in Word 2003
From the Tools menu in Word, select Options and then go to the General tab
and check the box against the "Confirm conversions at open" item. (In Word 2007 it is Office Button Word Options Advanced General Confirm file format conversion on open). Then when you attach the data source to the mail merge main document, you will be given the option of using the DDE method of connection which should read the data as you have it formatted in the table. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org Seventh.Son wrote: I have an alphanumeric Charge number (text field) formatted with hyphens - e.g., 21B-2009-01234. If I use that formatted field in MS Word 2003 the hyphens are stripped out. However, if I simply copy and paste into MS Word, the hyphens remain. There doesn't seem to be any "switch" to restore the formatting. Thank you. |
#3
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
How to keep Access MergeField from losing formatting in Word2003
In this type of situation I do not think the "DDE" approach works and
the simplest solution is probably to create a new query in your Access database that takes the data that Access actually stores (i.e. 21B200901234) and re-insert the hyphens. For example, if your data source is called mytable and the field is called charge, your query SQL could look like SELECT left(charge,3) & '-' & mid(charge,4,4) & '-' & right(charge,5) AS [hyphencharge], * FROM mytable; Then use that query as your data source. You should be able to connect using the default OLE DB method. If you are not in a position to modify your Access database, you can set up the same query in Word VBA, e.g. perhaps using ActiveDocument.MailMerge.OpenDataSource _ Name:="the full pathname of the .mdb", _ SQLStatement:= _ " SELECT left(charge,3) & '-' & mid(charge,4,4)" & _ " & '-' & right(charge,5) AS [hyphencharge], *" & _ " FROM mytable" Peter Jamieson http://tips.pjmsn.me.uk Seventh.Son wrote: I have an alphanumeric Charge number (text field) formatted with hyphens - e.g., 21B-2009-01234. If I use that formatted field in MS Word 2003 the hyphens are stripped out. However, if I simply copy and paste into MS Word, the hyphens remain. There doesn't seem to be any "switch" to restore the formatting. Thank you. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Mergefield Formatting - Trim function? Word 2000 | Mailmerge | |||
Losing phone # format from Access 2003 to Mail Merge | Mailmerge | |||
How can I reorder pages in Word 2003 without losing formatting? | Microsoft Word Help | |||
Losing formatting in Form Fields in Word 2003 | Tables | |||
Word 2003 - Losing formatting from Word 2002 document | Microsoft Word Help |