Using IF and INSERTTEXT to add page to original document

N

Nicole Knapp

I have read the thread linked at the bottom of this post with interest
because I am trying to do something similar, though (I think) more simply.

I have a document that uses a mail merge. I created the IF statement, with
the INSERTTEXT field and a next page break. But it will not open the file.

The file is buried pretty deep on a network server - but in the same folder
as the original document.
Both documents and folders leading to the documents have spaces in their
filenames. I tried replacing the spaces with underscores - but no luck.

This is my statement:
{IF {MERGEFIELD course} = “Course D†"{INCLUDETEXT
"J:\\Dept\\staff\\2009\\letter_Page_3.doc"}" ""}

I am using the letter drive, not the network drive name.
Thanks
Nik




http://www.microsoft.com/office/com...elds&mid=d72a9ca1-3ae0-4cf1-b857-dfc75769e8be
 
P

Peter Jamieson

The trouble with the construciton { IF something { INCLUDETEXT } }

is that when Word merges (say to a new document), it does not actually
"expand" the INCLUDETEXT - it just leaves the field in there. So you
should be able to select the output document (e.g. control-A) and press
F9 to update all the fields in it. If that does everything you need, I'd
carry on doing it that way and ignore the rest of this. If not, first of
all I'd check that

{INCLUDETEXT "J:\\Dept\\staff\\2009\\letter_Page_3.doc"}

on its own does what you expect

That's one reason why the conversation you referenced suggests doing it
"the other way around", i.e. using

{ INCLUDETEXT "<text and fields that make up the full path name of the
file to include>" }

In this case, you could try something like

{ INCLUDETEXT "{ IF "{ MERGEFIELD course }" = “Course Dâ€
"J:\\Dept\\staff\\2009\\letter_Page_3.doc" "<the path name of a file
with no text>" }" }

however you may find that you need a bit more than that.

Peter Jamieson

http://tips.pjmsn.me.uk
 
N

Nicole Knapp

Thanks - the Ctrl-F9 on the file name seemed to work.

Now I just need to get the formatting correct so that it puts "Page 3" on
page 3 and not partially on Page 2 & then to Page 3.

I believe I got the gist of that in the other thread.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top