J
JLB
What step have I overlooked?
I'm using Word 2003 and Excel 2003.
1. Datasource: I have an Excel spreadsheet that has names, addresses and a
lettercode: 1 is a new member; 2 is a renewing member.
2. Constant Text: I created a .DOC file with four paras of "welcome" text
and four paras of "thanks for renewing" text.
I selected the first four paras, clicked on Insert -> Bookmark and gave
them a bookmark of NEWMEMBER.
I selected the final four paras, clicked on Insert -> Bookmark and gave them
the bookmark of RENEWAL.
I saved the file as c:\testMM.doc
3. Generic Letter. I opened a blank Word document; displayed the mailmerge
toolbar and clicked on the "Main Document Setup" button. Then I clicked on
"Open Data Source" and navigated to my workbook and selected the sheet in it.
4. Using the "Insert Merge Field" button I inserted the name and address
fields. Then I typed "Dear " and inserted the given name field again. The
fields all appear within the braces and show MERGEFIELD and the fieldname I
selected.
5. I wanted to choose which letter was included so I clicked on the "Insert
Word Field" button and selected "If ... Then ... Else". In the popup under
Field name I selected "Lettercode", for Comparison I chose "Equal to" and for
Compare to I chose "newmember". (No quotes, of course). For Insert this
text I entered AAAAA and clicked OK. The statement was inserted into my
blank document along with "\* MERGEFORMAT.
6. I deleted the AAAAA and clicked on Insert | Field and selected
INCLUDETEXT. In the popup I clicked on the Field Codes button which changes
the display slightly to show the prompts for [Bookmark] and [switches]. I
put c:\textMM.doc, left a space and put the bookmarkname NEWMEMBER and
clicked OK.
7. In my document I changed the c:\ to c:\\ and I put quotes around the
path-and-filename but not, of course, around the bookmark. (Interestingly
enough, if you don't click on the Field Codes button then Word will add the
quotes and the extra "\".)
8. I repeated the process for the RENEWAL lettercode and bookmark.
9. Saved the Generic Letter and exited from Word.
10. Restart Word, opened the Generic Letter and (I've tried this both ways)
either said Yes (or No) to the prompt about running the SQL statement.
11. Click on the Check for Errors button. No errors.
12. Click on the Merge to a New Document button and the new document shows
the name and address but not the four paras of text for the two bookmarks.
What is my error and what do I need to do to correct it?
btw ... I know I could (should?) use a nested IF but let's get it working in
a simple way first of all. I also know that I can't simply type {} but have
to use Ctrl+F9.
JLB
I'm using Word 2003 and Excel 2003.
1. Datasource: I have an Excel spreadsheet that has names, addresses and a
lettercode: 1 is a new member; 2 is a renewing member.
2. Constant Text: I created a .DOC file with four paras of "welcome" text
and four paras of "thanks for renewing" text.
I selected the first four paras, clicked on Insert -> Bookmark and gave
them a bookmark of NEWMEMBER.
I selected the final four paras, clicked on Insert -> Bookmark and gave them
the bookmark of RENEWAL.
I saved the file as c:\testMM.doc
3. Generic Letter. I opened a blank Word document; displayed the mailmerge
toolbar and clicked on the "Main Document Setup" button. Then I clicked on
"Open Data Source" and navigated to my workbook and selected the sheet in it.
4. Using the "Insert Merge Field" button I inserted the name and address
fields. Then I typed "Dear " and inserted the given name field again. The
fields all appear within the braces and show MERGEFIELD and the fieldname I
selected.
5. I wanted to choose which letter was included so I clicked on the "Insert
Word Field" button and selected "If ... Then ... Else". In the popup under
Field name I selected "Lettercode", for Comparison I chose "Equal to" and for
Compare to I chose "newmember". (No quotes, of course). For Insert this
text I entered AAAAA and clicked OK. The statement was inserted into my
blank document along with "\* MERGEFORMAT.
6. I deleted the AAAAA and clicked on Insert | Field and selected
INCLUDETEXT. In the popup I clicked on the Field Codes button which changes
the display slightly to show the prompts for [Bookmark] and [switches]. I
put c:\textMM.doc, left a space and put the bookmarkname NEWMEMBER and
clicked OK.
7. In my document I changed the c:\ to c:\\ and I put quotes around the
path-and-filename but not, of course, around the bookmark. (Interestingly
enough, if you don't click on the Field Codes button then Word will add the
quotes and the extra "\".)
8. I repeated the process for the RENEWAL lettercode and bookmark.
9. Saved the Generic Letter and exited from Word.
10. Restart Word, opened the Generic Letter and (I've tried this both ways)
either said Yes (or No) to the prompt about running the SQL statement.
11. Click on the Check for Errors button. No errors.
12. Click on the Merge to a New Document button and the new document shows
the name and address but not the four paras of text for the two bookmarks.
What is my error and what do I need to do to correct it?
btw ... I know I could (should?) use a nested IF but let's get it working in
a simple way first of all. I also know that I can't simply type {} but have
to use Ctrl+F9.
JLB