Mail merge and conditional footer

O

okc.robinson

In Word 2010 I have created a footer that is supposed to appear on the lastpage only (if there is only one page, page 1 is considered the last page, if there are 2 pages, page 2 is the last page, etc). I used this code: { IF {PAGE}={NUMPAGES} "{EMBED Word.Document.12\s}" ""}
This worked fine until I decided it would suit my purposes to use mail merge to fill in certain fields for me. Now, after I merge, the footer ONLY appears on the second page (If there is one page only, no footer; if there are two pages, footer appears at bottom of second page as it is supposed to; if there are three pages, footer appears at the bottom of the second page, not the third as it is supposed to).
 
L

Lisa Wilke-Thissen

Hi,

[Word 2010]
I used this code: { IF {PAGE}={NUMPAGES} "{EMBED Word.Document.12\s}" ""}
Now, after I merge, the footer ONLY appears on the
second page ...

customize (right mouse click) the status bar of Word to show "Formatted Page
Number" as well as "Section" and "Page Number".

When finishing and merging "Letters", for each letter a separate section is
created.

Imagine your letter (main document) consists of two pages: page 1, page 2.
Your data source consists of 10 records. So in the final document (where all
records are merged) you will find 11 sections: 10 sections with page 1, page
2. In the last section you will only find an empty paragraph.
Therefore the document will have 20 (maybe 21) pages, which should be the
result of { NUMPAGES }
However each letter just has 2 pages: page 1, page 2. None of the page
numbers (1, 2) meets the result of { NUMPAGES } (= 20).

Maybe { SECTIONPAGES } will help.
 
O

okc.robinson

Lisa. I tried {SECTIONPAGES} and it puts my footer on all pages. Still searching for a fix.

Thanks for the suggestion. Please let me know if you have any other ideas. I am not a code writer, so this is all pretty foreign to me.


Hi,



[Word 2010]
I used this code: { IF {PAGE}={NUMPAGES} "{EMBED Word.Document.12\s}" ""}
Now, after I merge, the footer ONLY appears on the
second page ...



customize (right mouse click) the status bar of Word to show "Formatted Page

Number" as well as "Section" and "Page Number".



When finishing and merging "Letters", for each letter a separate section is

created.



Imagine your letter (main document) consists of two pages: page 1, page 2.

Your data source consists of 10 records. So in the final document (where all

records are merged) you will find 11 sections: 10 sections with page 1, page

2. In the last section you will only find an empty paragraph.

Therefore the document will have 20 (maybe 21) pages, which should be the

result of { NUMPAGES }

However each letter just has 2 pages: page 1, page 2. None of the page

numbers (1, 2) meets the result of { NUMPAGES } (= 20).



Maybe { SECTIONPAGES } will help.



--

Cheers,

Lisa
 
W

wvoorhees99

Lisa. I tried {SECTIONPAGES} and it puts my footer on all pages. Still searching for a fix.



Thanks for the suggestion. Please let me know if you have any other ideas. I am not a code writer, so this is all pretty foreign to me.





Hi,
[Word 2010]
I used this code: { IF {PAGE}={NUMPAGES} "{EMBED Word.Document.12\s}" ""}
Now, after I merge, the footer ONLY appears on the
second page ...
customize (right mouse click) the status bar of Word to show "Formatted Page
Number" as well as "Section" and "Page Number".
When finishing and merging "Letters", for each letter a separate section is

Imagine your letter (main document) consists of two pages: page 1, page 2.
Your data source consists of 10 records. So in the final document (where all
records are merged) you will find 11 sections: 10 sections with page 1, page
2. In the last section you will only find an empty paragraph.
Therefore the document will have 20 (maybe 21) pages, which should be the
result of { NUMPAGES }
However each letter just has 2 pages: page 1, page 2. None of the page
numbers (1, 2) meets the result of { NUMPAGES } (= 20).
Maybe { SECTIONPAGES } will help.

Lisa

Have you found a solution or would you still like a solution?


Lisa. I tried {SECTIONPAGES} and it puts my footer on all pages. Still searching for a fix.



Thanks for the suggestion. Please let me know if you have any other ideas. I am not a code writer, so this is all pretty foreign to me.





Hi,
[Word 2010]
I used this code: { IF {PAGE}={NUMPAGES} "{EMBED Word.Document.12\s}" ""}
Now, after I merge, the footer ONLY appears on the
second page ...
customize (right mouse click) the status bar of Word to show "Formatted Page
Number" as well as "Section" and "Page Number".
When finishing and merging "Letters", for each letter a separate section is

Imagine your letter (main document) consists of two pages: page 1, page 2.
Your data source consists of 10 records. So in the final document (where all
records are merged) you will find 11 sections: 10 sections with page 1, page
2. In the last section you will only find an empty paragraph.
Therefore the document will have 20 (maybe 21) pages, which should be the
result of { NUMPAGES }
However each letter just has 2 pages: page 1, page 2. None of the page
numbers (1, 2) meets the result of { NUMPAGES } (= 20).
Maybe { SECTIONPAGES } will help.

Lisa
 

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