By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,356 Members | 1,023 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,356 IT Pros & Developers. It's quick & easy.

Creating a new Word document through VB.NET

P: n/a
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

Dec 14 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.