Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Comment text highlighting lost after merge
I have a user form that merges with with an Access database. I am using the
"PreserveFormFieldsAfterMerge" macro I found on this site. After the merge, the comments from the original form are still there, but the text they are attached to is no longer highlighted (the comment field code is highlighted, but not the text). Is there anything I can do to fix this? |
#2
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Comment text highlighting lost after merge
Not without some additional vba coding. Are you creating multiple documents
at the one time with the data from the database or is it only one document that is being created at a time? -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "Smhall" wrote in message ... I have a user form that merges with with an Access database. I am using the "PreserveFormFieldsAfterMerge" macro I found on this site. After the merge, the comments from the original form are still there, but the text they are attached to is no longer highlighted (the comment field code is highlighted, but not the text). Is there anything I can do to fix this? |
#3
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Comment text highlighting lost after merge
The merge creates one document, then I use a "splitter" macro to save into
individual files. The problem seems to happen after the initial merge, because the resulting document has the highlighting problem as well. BTW, I am using Word 2000. "Doug Robbins - Word MVP" wrote: Not without some additional vba coding. Are you creating multiple documents at the one time with the data from the database or is it only one document that is being created at a time? -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "Smhall" wrote in message ... I have a user form that merges with with an Access database. I am using the "PreserveFormFieldsAfterMerge" macro I found on this site. After the merge, the comments from the original form are still there, but the text they are attached to is no longer highlighted (the comment field code is highlighted, but not the text). Is there anything I can do to fix this? |
#4
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Comment text highlighting lost after merge
If you are saying that the highlighting is not present in the document
created when you execute the merge, then I think that you are going to have to "roll your own" method of transferring the data into the document. I would do it by replacing the mergefields in the main document with DOCVARIABLE fields and then use code to iterate through the database, setting variables in the document to the values of the fields in the active record, updating the fields in the document so that the data is displayed in the DOCVARIABLE fields and then saving the document with a name (probably taken from the database) before repeating the process. The code would be something like 'allocate memory for the database object as a whole and for the active record Dim myDataBase As Database Dim myActiveRecord As Recordset 'Open a database Set myDataBase = OpenDatabase("E:\Access97\Ely\ResidencesXP.mdb") 'Access the first record from a particular table Set myActiveRecord = myDataBase.OpenRecordset("Owners", dbOpenForwardOnly) 'Loop through all the records in the table until the end-of-file marker is reached Do While Not myActiveRecord.EOF With ActiveDocument .Variables("varname").Value = myActiveRecord.Fields("correspondingfieldname") 'Repeat for each field .Fields.Update .SaveAs "Path\Filename" End With 'access the next record myActiveRecord.MoveNext Loop 'Then close the database myActiveRecord.Close myDataBase.Close -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "Smhall" wrote in message ... The merge creates one document, then I use a "splitter" macro to save into individual files. The problem seems to happen after the initial merge, because the resulting document has the highlighting problem as well. BTW, I am using Word 2000. "Doug Robbins - Word MVP" wrote: Not without some additional vba coding. Are you creating multiple documents at the one time with the data from the database or is it only one document that is being created at a time? -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "Smhall" wrote in message ... I have a user form that merges with with an Access database. I am using the "PreserveFormFieldsAfterMerge" macro I found on this site. After the merge, the comments from the original form are still there, but the text they are attached to is no longer highlighted (the comment field code is highlighted, but not the text). Is there anything I can do to fix this? |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Header with picture or text box | Page Layout | |||
manipulating/cutting/pasting text out of a text box | Microsoft Word Help | |||
merge instructions from text file | Mailmerge | |||
Suppressing Merge Field and text before/after | Microsoft Word Help | |||
Outline | Page Layout |