B
BurtArkin
OS is XPPro, Access2002 and Word2002. Access has msword.olb library
registered. Is it possible for my access code to find a file, rename it and
save it, locate the source, and then not format the word document? A sample
of the formatting code is below. I'd really appreciate some help here.
Thanks.
WApp.Selection.Find.ClearFormatting
Dim rngDocument As Object
''Find each instance of BLD and make entire paragraph bold, then delete "BLD"
Set rngDocument = WApp.ActiveDocument.Range
With rngDocument.Find
.ClearFormatting
.Replacement.ClearFormatting
.Text = "BLD"
.Forward = True
.Wrap = 0 'wdFindStop
.Format = False
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
.Execute
While .Found
rngDocument.Paragraphs.First.Range.Font.Bold = True
rngDocument.Paragraphs.Alignment = wdAlignParagraphCenter 'my addition
for centering
rngDocument.Delete
rngDocument.MoveEnd 6 'wdStory
.Execute
Wend
End With
registered. Is it possible for my access code to find a file, rename it and
save it, locate the source, and then not format the word document? A sample
of the formatting code is below. I'd really appreciate some help here.
Thanks.
WApp.Selection.Find.ClearFormatting
Dim rngDocument As Object
''Find each instance of BLD and make entire paragraph bold, then delete "BLD"
Set rngDocument = WApp.ActiveDocument.Range
With rngDocument.Find
.ClearFormatting
.Replacement.ClearFormatting
.Text = "BLD"
.Forward = True
.Wrap = 0 'wdFindStop
.Format = False
.MatchCase = True
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
.Execute
While .Found
rngDocument.Paragraphs.First.Range.Font.Bold = True
rngDocument.Paragraphs.Alignment = wdAlignParagraphCenter 'my addition
for centering
rngDocument.Delete
rngDocument.MoveEnd 6 'wdStory
.Execute
Wend
End With