Z
Zach Obert
I'm using Access 2002 to fill out a template I've set up
in Word 2002. Part of the code I'm using is to do a find
and replace for certain phrases I've set up, such as
project name. The code I'm using is:
Public Sub FindAndReplaceReportInfo(TextToFind As String,
ReplacementText As String)
With m_oWordDoc.Content.Find
'.ClearFormatting
.Font.Underline = wdUnderlineDouble
.Text = TextToFind
With .Replacement
'.ClearFormatting
.Font.Underline = wdUnderlineNone
.Text = ReplacementText
End With
.Execute Replace:=wdReplaceAll, Format:=True,
MatchCase:=True, MatchWholeWord:=True
End With
End Sub
Everything works fine on laptops with Windows 2000 and
Office XP, laptops with Windows XP and Office XP, and on
desktops with Windows XP and Office XP, but it won't work
on TabletPC's (I've tried two different ones). Any ideas
on how to either fix this so it works on a TabletPC or to
re-write the code to do this differently? The only thing
I can think of is to use bookmarks in Word.
in Word 2002. Part of the code I'm using is to do a find
and replace for certain phrases I've set up, such as
project name. The code I'm using is:
Public Sub FindAndReplaceReportInfo(TextToFind As String,
ReplacementText As String)
With m_oWordDoc.Content.Find
'.ClearFormatting
.Font.Underline = wdUnderlineDouble
.Text = TextToFind
With .Replacement
'.ClearFormatting
.Font.Underline = wdUnderlineNone
.Text = ReplacementText
End With
.Execute Replace:=wdReplaceAll, Format:=True,
MatchCase:=True, MatchWholeWord:=True
End With
End Sub
Everything works fine on laptops with Windows 2000 and
Office XP, laptops with Windows XP and Office XP, and on
desktops with Windows XP and Office XP, but it won't work
on TabletPC's (I've tried two different ones). Any ideas
on how to either fix this so it works on a TabletPC or to
re-write the code to do this differently? The only thing
I can think of is to use bookmarks in Word.