Creating a new Word document through VB.NET

G

goof1972

Hello All,

I have a VB.NET web application (1.1 framework) that creates a new Word
document through interop.word.dll. I have a Windows Server 2003 with
Office XP Professional installed. I've also installed the Office XP
PIA.

In 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. I was expecting a
Word.document object. There was no errors..nothing! I even checked the
Event Logs and could not find any error messages! Why is this
happening? It looks like a new Word document is not being created!

Any help would be appreciated.

Thanks in advance!

Brian
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top