Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
I believe my final solution is to give up. Cannot get this cursed code to
stop inserting unnecessary and unwanted Carriage Returns. Am going back to less elegant but works plan A (inserted documents, bookmarks and {Ref} fields). So much for improving & simplifying documents. Thanks for the feedback. "Xanbaby" wrote in message ... Aarrgggghhhhh!!!!!!!! Can get the code to work as long as it isn't enclosed in IF commands. Looks like some interaction between the IF commands and the Insert Database. Will keep going, but at least I'm getting consistent results, which makes me feel it may just need a tweak. Only have to find it. Or go insane in the attempt....... Will post back when I am successful, or have given up. "Peter Jamieson" wrote in message ... and am refusing to ever look at the cursed code ever, ever, ever again. Can't say I blame you. Microsoft made a change to the behaviour of DATABASE fields at some point which does cause an unhelpful extra paragraph to be inserted, but perhaps \*Charformat introduces another wrinkle I hadn't previously encountered, so thanks for posting back. Peter Jamieson http://tips.pjmsn.me.uk Visit Londinium at http://www.ralphwatson.tv On 05/10/2009 16:40, Xanbaby wrote: Replying to my own post below, I used \* MERGEFORMAT instead, which sorted the issue. I now have it working, and am refusing to ever look at the cursed code ever, ever, ever again. Thanks for all the help, it is very useful& much appreciated. wrote in message ... Duh. Yes, of course, applying *\ CHARFORMAT to the {Database} field is the answer, can't believe I overlooked that, not enough coffee obviously. Unfortunately for me though, it's thrown up a weird knock on effect. Following population of the mailmerge, the field populated and aligned as normal UNTIL I applied the *\ CHARFORMAT to the {Database} field in the master document. Once this is completed, the formatting does indeed change to Bold, however a hard carriage return is also appearing before the field, so the field is now misaligning. I have analysed the document, and after the merge is completed have discovered the following: 1. When viewing the document without Show/Hide formatting selected (and before CHARFORMAT is applied to the field in the master document), all looks fine. 2. When viewing the document with Show/Hide Formatting selected (and before CHARFORMAT is applied to the field in the master document), there is a carriage return before the field (this disappears again once the Show/Hide Formatting is turned off, and the document also prints correctly. I am unable to manually delete the carriage return. This is puzzling me greatly). 3. Once the CHARFORMAT is applied to the field, the carriage return appears in the merged document, and the document misaligns. So, to summarise, a carriage return is somehow magically creeping in, but while there, doesn't cause the document to look/print incorrectly unless CHARFORMAT is applied to the field. Don't think coffee is going to help me on this, any ideas would be greatly appreciated. "Peter wrote in message ... When I looked at your screenshot, there was no \*Charformat switch at the end of the { DATABASE } field. What Doug was saying is that you need that switch /and/ to apply bold formatting to the D of the DATABASE field (or the whole field, if you like) It works OK here but I wouldn't want to predict what happens if your table flows over more than one page. Peter Jamieson http://tips.pjmsn.me.uk Visit Londinium at http://www.ralphwatson.tv Xanbaby wrote: Sorry, meant field "BED.DIVISION", ignore reference to"BED.TEL" in earlier post. Any assistance would really be greatly appreciated. wrote in message ... Yes I have. Weirdly, when "Toggle Field Codes" is carried out on the field, the toggled codes are in bold, and I've re-applied bold many, many times to the toggled codes and the field when it's not toggled, however when the merge is run, it loses the formatting. I'm attaching (hopefully!) a jpg with the toggled code, in the hope that it may assist. The fieldBED.TEL" is in the main database, the rest of the code is looking at a small separate database. Any further advice you could give me would be greatly appreciated. "Doug Robbins - Word wrote in message ... Have you applied Bold formatting to the first character of the field to which you have applied the charformat switch? -- 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, originally posted via msnews.microsoft.com wrote in message ... Using Word 2003, I have a mail merge which also has an inserted database (by using Insert/Field/Database, browsing to the database, and inserting the conditional database as a field excluding formatting). This database is used to generate a telephone number dependant on data in the main database (and I have to do it this way, unfortunately!!!!). So, I have an inserted field which produces a result and displays on the document. All working fine except; I can't seem to apply any formatting to the field (all I want in this instance is to make the result bold). Teh field is embedded in a few IF commands, and I've replaced * Mergeformat with * Charformat wherever I could find them, all to no avail. Any ideas on how to make the formatting stick once the mail merge ins run would be greatly appreciated, as it's driving me absolutely nuts. |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Problem when date field from Excel database is inserted to Word 20 | Mailmerge | |||
database field - merge single field from excel list | Microsoft Word Help | |||
How do I print a .mdb database inserted into a merged document | Mailmerge | |||
formatting inserted files? | Microsoft Word Help | |||
Formatting of inserted files | Microsoft Word Help |