Word 2000 macro

brianlb

Board Regular
Joined
May 12, 2009
Messages
83
I'm creating a word merge into a new doc. I have text fields that aren't merging, so I looked for help and found this macro on MS support that's suppose to fix it and have the merge retain any text fields. http://support.microsoft.com/kb/211308/
I put it all in, and it works except on the 2nd page of the doc it leaves the place holders. The doc is only two pages after the merge, 3 before the merge, anyone know why the it creates text fields on the first page, but not on the second page?
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Hi Brian,

The MSKB article relates to mailmerge documents that also have formfields. Is that what you're using? If not, the solution isn't applicable to your situation.

Perhaps you could provide more detail (eg what type of merge are you doing, what sort of data you're working with, Word version, etc).
 
Upvote 0
Hi Brian,

The MSKB article relates to mailmerge documents that also have formfields. Is that what you're using? If not, the solution isn't applicable to your situation.

yes, that's what i'm referring to, but it's not working properly when i run the macro. some of the text fields show up after the merge and some don't.
 
Upvote 0
Hi Brian,

I don't believer the problem has anything to do with the MSKB macros. Rather, given the changed page count, it seems likely to be something to do with your mailmerge main document's formatting (eg some of the content is formatted as hidden). What happens if you simply do a merge without running the macros - apart from the loss of the text formfields, does anything else change?
 
Upvote 0
Hi Brian,

I don't believer the problem has anything to do with the MSKB macros. Rather, given the changed page count, it seems likely to be something to do with your mailmerge main document's formatting (eg some of the content is formatted as hidden). What happens if you simply do a merge without running the macros - apart from the loss of the text formfields, does anything else change?

nothing else happens if i just do a regular merge w/no macros, it starts out as a 3 page doc, due to the extra spacing being taken up from the merge data, then goes to a 2 page doc after the merge, just not all the text fields are there. mostly on the 2nd page they are missing.
 
Upvote 0
Hi Brian,

When you do a merge without running the macros, the output file should look essentially the same as the mailmerge main document, except that the mergefields will have been replaced by the corresponding data and the text formfields will have been deleted. Is that what you're getting?

If so, what happens if you comment out the lines:
doFindReplace iCount, fField, fFieldText()
in the 'Sub PreserveMailMergeFormFieldsNewDoc()' sub and run it? You should get an output file that looks essentially the same as the mailmerge main document, except that the mergefields will have been replaced by the corresponding data and the text formfields will have replaced by their placemarkers.
 
Upvote 0
If i comment that line out it will merge, and bring over all the data but none of the text fields will show up, they all show this " [FONT=&quot]<Text5PlaceHolder>[/FONT]" instead of the text field, except the number is changed for each individual place holder. Although on some of the areas it's doesn't have a number just says " [FONT=&quot]<PlaceHolder>[/FONT]" and I noticed that before too even w/o that line commented out. That mainly shows up on the 2nd page after the merge.


Hi Brian,

When you do a merge without running the macros, the output file should look essentially the same as the mailmerge main document, except that the mergefields will have been replaced by the corresponding data and the text formfields will have been deleted. Is that what you're getting?

If so, what happens if you comment out the lines:
doFindReplace iCount, fField, fFieldText()
in the 'Sub PreserveMailMergeFormFieldsNewDoc()' sub and run it? You should get an output file that looks essentially the same as the mailmerge main document, except that the mergefields will have been replaced by the corresponding data and the text formfields will have replaced by their placemarkers.
 
Upvote 0
Hi Brian,

The placeholders without the 'Text#' prefix represent text formfields that lack a bookmark name. If you select those formfields in the mailmerge main document and check their properties, you'll see that. If you add a unique bookmark name to each of those formfields, then re-run the merge process with the macros in their original state, I suspect everything will work OK.
 
Upvote 0
Hi Brian,

The placeholders without the 'Text#' prefix represent text formfields that lack a bookmark name. If you select those formfields in the mailmerge main document and check their properties, you'll see that. If you add a unique bookmark name to each of those formfields, then re-run the merge process with the macros in their original state, I suspect everything will work OK.

thx, i think it's working ok now. Does it matter what number I give the bookmark? Assuming it's not one already given.
 
Upvote 0

Forum statistics

Threads
1,225,399
Messages
6,184,752
Members
453,254
Latest member
topeb

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top