WD2001: Word 5.1 Mail Merge Document with Conditional IF Statement Converts Incorrectly (268435)
The information in this article applies to:
- Microsoft Word 98 Macintosh Edition
- Microsoft Word 2001 for Macintosh
This article was previously published under Q268435 SYMPTOMS In Microsoft Word 2001, when you perform a mail merge using
a document created in Microsoft Word 5.1, the mail merge operation may not
function as expected. In the merged document, the information from the merged
fields may be missing, and the document may contain an extra character ("1").
CAUSE This behavior occurs if the conditional IF statement in
Word 5.1 does not correctly convert to Word 2001. WORKAROUND To work around this issue, create a macro that does the
following:
- Turns on the field codes.
- Replaces every instance of space=space1space ( = 1 ) with a
single space ( ).
- Turns off the field codes.
- Selects the whole document.
- Updates the document so that the IF statements are
updated.
Microsoft
provides programming examples for illustration only, without warranty either
expressed or implied, including, but not limited to, the implied warranties of
merchantability and/or fitness for a particular purpose. This article assumes
that you are familiar with the programming language being demonstrated and the
tools used to create and debug procedures. Microsoft support professionals can
help explain the functionality of a particular procedure, but they will not
modify these examples to provide added functionality or construct procedures to
meet your specific needs. If you have limited programming experience, you may
want to contact a Microsoft Certified Partner or the Microsoft fee-based
consulting line at (800) 936-5200. For more information about Microsoft
Certified Partners, please visit the following Microsoft Web site: For more information about the support options that are available
and about how to contact Microsoft, visit the following Microsoft Web site: The following sample macro can be used to repair
the conditional IF statements that have been imported from a Word 5.1 document:
Sub fixfields()
ActiveWindow.View.ShowFieldCodes = Not ActiveWindow.View.ShowFieldCodes
Application.DisplayStatusBar = True
With ActiveWindow
.DisplayHorizontalScrollBar = True
.DisplayVerticalScrollBar = True
.DisplayVerticalRuler = True
.DisplayScreenTips = True
With .View
.ShowAnimation = True
.ShowPicturePlaceHolders = False
.ShowFieldCodes = True
.ShowBookmarks = False
.FieldShading = wdFieldShadingWhenSelected
.ShowTabs = False
.ShowSpaces = False
.ShowParagraphs = False
.ShowHyphens = False
.ShowHiddenText = False
.ShowAll = False
.ShowDrawings = True
.ShowObjectAnchors = False
.ShowTextBoundaries = False
.ShowHighlight = True
End With
End With
Options.LiveWordCount = False
Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
With Selection.Find
.Text = " = 1 "
.Replacement.Text = " "
.Forward = False
.Wrap = wdFindContinue
.Format = False
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With
Selection.Find.Execute Replace:=wdReplaceAll
ActiveWindow.View.ShowFieldCodes = Not ActiveWindow.View.ShowFieldCodes
Application.DisplayStatusBar = True
With ActiveWindow
.DisplayHorizontalScrollBar = True
.DisplayVerticalScrollBar = True
.DisplayVerticalRuler = True
.DisplayScreenTips = True
With .View
.ShowAnimation = True
.ShowPicturePlaceHolders = False
.ShowFieldCodes = False
.ShowBookmarks = False
.FieldShading = wdFieldShadingWhenSelected
.ShowTabs = False
.ShowSpaces = False
.ShowParagraphs = False
.ShowHyphens = False
.ShowHiddenText = False
.ShowAll = False
.ShowDrawings = True
.ShowObjectAnchors = False
.ShowTextBoundaries = False
.ShowHighlight = True
End With
End With
Options.LiveWordCount = False
Selection.WholeStory
ActiveWindow.ActivePane.LargeScroll Down:=-1
Selection.Fields.Update
End Sub
STATUSMicrosoft
has confirmed that this is a problem in the Microsoft products that are listed
at the beginning of this article.
Modification Type: | Major | Last Reviewed: | 8/29/2006 |
---|
Keywords: | kbbug kbnofix KB268435 |
---|
|