Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
I've created a .dot template file (I've tried it with a .dotx template also
with the same issue) and am launching it from an Access database. The Word template contains three fields: {FILENAME \* MERGEFORMAT} {DATE \@ "dd/MM/yy" \* MERGEFORMAT} {PAGE }. The problem is as follows: 1) The database names the new document, saves it under the new name and launches the Word template - and works fine 2) When the document opens, the DATE field and the PAGE NUMBER field work fine and when you click on them they are still fields which will update as normal. 3) The FILENAME field, however, is replaced with the name of the template - not actually of the filename. Worse still, this is no longer a field name so can't update with the new filename. I've trawled the net and am baffled as to why this would be happening and what I can do to fix it. Hope you guys are cleverer than me! Regards, Andrew |
#2
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
The { filename } field is "resolved" when you merge so { filename \p }
should show the pathname of the mail merge main document. If you need it to show the pathname of the output document, one thing you can do is... a. create a new .doc or .docx - let's call it c:\myfiles\pn.doc b. insert a { filename \p } field in that document c. bookmark that field - let's call the bookmark "pn" d. put the following nested field in your mail merge main document { INCLUDETEXT "c:\\myfiles\\pn.doc pn } e. do the merge f. save the output document g. select the "story" in the document that contains the { INCLUDETEXT } field (e.g. if it's in the header, select the header h. press F9 to update the field results. You may need to verify that that has updated all the headers. Peter Jamieson http://tips.pjmsn.me.uk Visit Londinium at http://www.ralphwatson.tv Andrew @ ISL wrote: I've created a .dot template file (I've tried it with a .dotx template also with the same issue) and am launching it from an Access database. The Word template contains three fields: {FILENAME \* MERGEFORMAT} {DATE \@ "dd/MM/yy" \* MERGEFORMAT} {PAGE }. The problem is as follows: 1) The database names the new document, saves it under the new name and launches the Word template - and works fine 2) When the document opens, the DATE field and the PAGE NUMBER field work fine and when you click on them they are still fields which will update as normal. 3) The FILENAME field, however, is replaced with the name of the template - not actually of the filename. Worse still, this is no longer a field name so can't update with the new filename. I've trawled the net and am baffled as to why this would be happening and what I can do to fix it. Hope you guys are cleverer than me! Regards, Andrew |
#3
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
Hi,
Really appreciate your input, but although I can see this might get round the issue, it doesn't solve it. Each time we create a new file from Access, it's creating a new Word document and automatically placing it in a different folder on the computer - these aren't mail merges that we're doing for marketing campaigns etc. but are daily quotes to different customers. So basically, all I want to do is make the {FILENAME \* MERGEFORMAT} field in the document template stay as a field which will automatically update when the file is created/saved - at present, when the merged document is launched it becomes text so therefore doesn't update. I think with your method it would end up as quite a task. Thanks again. A |
#4
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
If I knew of a simpler method that did what you wanted I would have
mentioned it. Perhaps someone else will come along with one. However, I can't change what Word does with fields when it merges, and in fact Word does not usually update fields immediately before it /saves/ - i.e. if the user has to type a file name in the Save As dialog, the filename field is unlikely to be updated until you actually re-open the document, and even then it may or may not be automatic. But if no-one else can think of one either then you're stuck with "the simplest workable approach," and what is likely to be "simple" depends on what your workflow looks like, whether or not you are already automating using code, who's doing what, and typically, what the user thinks is simple. One of the "simple" things about using fields is that you don't have to deploy a VBA-based solution, but if you are already using VBA or it would be easy for you to do so, it is probably simpler to think in terms of inserting the pathname programmatically rather than using a field. if that's what you want to do, I can certainly make some suggestions. Peter Jamieson http://tips.pjmsn.me.uk Visit Londinium at http://www.ralphwatson.tv Andrew @ ISL wrote: Hi, Really appreciate your input, but although I can see this might get round the issue, it doesn't solve it. Each time we create a new file from Access, it's creating a new Word document and automatically placing it in a different folder on the computer - these aren't mail merges that we're doing for marketing campaigns etc. but are daily quotes to different customers. So basically, all I want to do is make the {FILENAME \* MERGEFORMAT} field in the document template stay as a field which will automatically update when the file is created/saved - at present, when the merged document is launched it becomes text so therefore doesn't update. I think with your method it would end up as quite a task. Thanks again. A |
#5
![]()
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
![]()
Hi Peter,
That's the conclusion/solution we've come up with as well - VBA. Disappointing that MS didn't make it a bit easier on the Word front, though. Thanks for your help! Kind regards, Andrew |
Reply |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Word Stops working | Microsoft Word Help | |||
Word 2007 stops working | Microsoft Word Help | |||
WORD 2007 STOPS WORKING | Microsoft Word Help | |||
Go to next field stops working | Microsoft Word Help | |||
Word tries to access the internet every time it is launched | Microsoft Word Help |