Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Creating a new Word document through VB.NET

Reply
Thread Tools

Creating a new Word document through VB.NET

 
 
goof1972
Guest
Posts: n/a
 
      12-14-2005
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
generating word document with header and footerwithout using word object. srk ASP .Net 0 04-25-2007 06:34 AM
generating word document with header and footerwithout using word object. srk ASP .Net 0 04-24-2007 01:59 PM
Creating new word document srigattugari@gmail.com Java 2 12-28-2006 07:43 AM
WScript syntax for creating a new document based on a Word template GaryB Javascript 1 12-01-2005 07:17 PM
Modifying a Word document without using Word Automation Michael G. Schneider ASP General 5 12-16-2003 06:52 PM



Advertisments