Creating a new Word document through VB.NET

Discussion in 'ASP .Net' started by goof1972, Dec 14, 2005.

  1. goof1972

    goof1972 Guest

    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
    goof1972, Dec 14, 2005
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Nikhil Patel

    creating word document in asp.net

    Nikhil Patel, May 12, 2004, in forum: ASP .Net
    Replies:
    4
    Views:
    995
    Nikhil Patel
    May 13, 2004
  2. =?Utf-8?B?Tm92aWNl?=

    Creating Word Document in ASP.NET Application

    =?Utf-8?B?Tm92aWNl?=, Aug 17, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    12,685
    =?Utf-8?B?Tm92aWNl?=
    Aug 17, 2004
  3. Steve C. Orr [MVP, MCSD]

    Re: Creating Word document File in C# .Net

    Steve C. Orr [MVP, MCSD], Aug 29, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    2,754
    Steve C. Orr [MVP, MCSD]
    Aug 29, 2004
  4. Replies:
    2
    Views:
    356
    Andrew Thompson
    Dec 28, 2006
  5. GaryB
    Replies:
    1
    Views:
    108
Loading...

Share This Page