Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Andrew @ ISL Andrew @ ISL is offline
external usenet poster
 
Posts: 1
Default Word field stops working when launched from Access

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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Word field stops working when launched from Access

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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Andrew @ ISL[_2_] Andrew @ ISL[_2_] is offline
external usenet poster
 
Posts: 2
Default Word field stops working when launched from Access

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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter Jamieson Peter Jamieson is offline
external usenet poster
 
Posts: 4,582
Default Word field stops working when launched from Access

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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Andrew @ ISL[_2_] Andrew @ ISL[_2_] is offline
external usenet poster
 
Posts: 2
Default Word field stops working when launched from Access

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

Posting Rules

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Word Stops working Terry Microsoft Word Help 3 August 31st 09 10:45 PM
Word 2007 stops working genie56 Microsoft Word Help 1 June 15th 09 01:48 PM
WORD 2007 STOPS WORKING TEE4MESA Microsoft Word Help 4 December 15th 08 07:26 PM
Go to next field stops working [email protected] Microsoft Word Help 1 July 16th 06 01:51 PM
Word tries to access the internet every time it is launched RA RHU Microsoft Word Help 4 May 21st 05 12:30 AM


All times are GMT +1. The time now is 07:33 PM.

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"