Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #7   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Mergefields, IF statements and section breaks

If the filename has spaces then the spaces must remain in the field.

Forget the merge for a moment.
Does {INCLUDETEXT "J:\\Dept\\staff\\2009\\letter_Page_3.doc"}
or
{INCLUDETEXT "J:\\Dept\\staff\\2009\\letter Page 3.doc"}
insert the document?

If it does not, check the path and filename are correct.

Once you have the insertion working, you can add the field to your merge
document

{IF {MERGEFIELD course} = "Course D" "{INCLUDETEXT
"J:\\Dept\\staff\\2009\\letter_Page_3.doc"}" ""}

Note that in the above which I have pasted from your question, you have
smart quotes around Course D. You need to change those for straight quotes
thus

{IF {MERGEFIELD course} = "Course D" "{INCLUDETEXT
"J:\\Dept\\staff\\2009\\letter_Page_3.doc"}" ""}

Your next page break needs to go inside the quotes around the Includetext
field

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

You may also need to merge to a new document and update the fields in that
new document in order to display the inserted document.

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org





Nicole Knapp wrote:
I have read this entire thread with interest because I am trying to do
something similar, though more simple.

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



 
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
Replace Section Breaks with Page Breaks Automatically? Tyler T Microsoft Word Help 15 March 5th 09 07:58 AM
Continuous Section breaks, Next page section breaks, headers and f Chris K. Page Layout 8 June 3rd 08 02:57 PM
replace auto page breaks with section breaks scottrogers Page Layout 3 October 30th 07 08:54 PM
Converting page breaks to section breaks automatically- 2007 Freida Page Layout 5 January 11th 07 06:00 PM
Replace Section Breaks with Page Breaks Automatically? Tyler T Microsoft Word Help 0 October 6th 06 09:51 PM


All times are GMT +1. The time now is 11:50 AM.

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"