Hi Goof1972,
[Quoted Text] > n my VB.NET application, I want to create a new Word document using > the following code: > > Dim MSWord As New Word.ApplicationClass > Dim doc As Word.Document > > doc = MSWord.Documents.Add() > > Unfortunately, when I step through the code, I discover that once the > previous code bit was done, doc=Nothing. >
Try this and see if it works any better:
Dim MSWord as Word.Application Dim doc as Word.Document
MSWord = New Word.Application doc = MSWord.Documents.Add()
Cindy Meister INTER-Solutions, Switzerland http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004) http://www.word.mvps.org
This reply is posted in the Newsgroup; please post any follow question or reply in the newsgroup and not by e-mail :-)
|