I have:
Win2K
Office2000
Working in VB.Net (2003)
My .Net project has a reference to Word 9.0
Instantiating things in a simple and straightforward manner:
Dim word as Word.Application
Dim doc As Word.Document
Dim range As Word.Range
Dim selection As Word.Selection
word = New Word.Application
doc = word.Documents.Add("<path to a .dot>")
Everything works fine, until I try to do a Find:
range.Find.Text = "Your string here"
The Find object returns a NullReferenceException. I've tried every
variation I can think of using Find, including using the Selection.Find
object. The same code works okay in VB6, although that's probably
irrelevent except for verifying my syntax is okay.
I've Googled this issue to the point of exhaustion, and haven't been able
to find an answer. Anybody have any ideas?
Thanks
--
Message posted via http://www.dotnetmonster.com