Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
typelib Word Search and Replace
#1
I am trying to do several search and replaces for a form we use in Microsoft Word using typelib. After a lot of searching on the forums, I am close. For example I would like to replace Not Applicable with Applicable. I would like not to use the clipboard but will if necessary. I also found that I could use key strokes after word was activated. There is a better way that I am not getting! Anyone have any ideas?

Macro test
Code:
Copy      Help
typelib Word {00020905-0000-0000-C000-000000000046} 8.5
Word.Document x._getfile("D:\Test.doc")
Word.Application app=x.Application
Word.Range r
app.Visible = TRUE
r=x.Range
VARIANT na="Not Applicable"
r.Find.Execute(na)
r.Select
r.Paste


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)