Windows Vista Forums
Vista Forums Home Join Vista Forums Windows 7 Forum Vista Tutorials Tags
Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks.

Go Back   Vista Forums > Misc Newsgroups > .NET General

Vista - Re: Creating a Microsoft Word document - request 2

Reply
 
Old 08-01-2008   #1 (permalink)
Art


 
 

Re: Creating a Microsoft Word document - request 2

Hello,

I saw this posting and it is the closest place to ask this question. I am
simply trying to create a Word document from a VB application I am wrting
with Visual Studio 2005.

I cut a pasted a simple routine within the 'click' sub-routine and I'm
simple having a problem with resolving the statement 'Dim objWord As New
Word.Application' where it is complaining about 'Word.Application' is not
defined.

I did add the reference to the Microsoft Word Object Library. Can one of you
perhaps tell me why I cannot resolve this?

Thanks in advance.

"Gerhard" wrote:
Quote:

> Thanks. This was very helpful.
>
> "Cowboy (Gregory A. Beamer)" wrote:
>
Quote:

> > I have not programmed against the Office libraries (Office bits) since 2001
> > or 2002, so I would have nothing recent, if I still have samples.
> >
> > I would try something like this
> > (http://www.codeproject.com/aspnet/wordapplication.asp) first.
> >
> > --
> > Gregory A. Beamer
> > MVP, MCP: +I, SE, SD, DBA
> >
> > *************************************************
> > | Think outside the box!
> > |
> > *************************************************
> > "Gerhard" <Gerhard@xxxxxx> wrote in message
> > news:8331F307-6823-4BC6-ACD0-001AD6C67ED7@xxxxxx
Quote:

> > > Thanks. Any examples on the Office bits you mentioned?
> > >
> > > "Cowboy (Gregory A. Beamer)" wrote:
> > >
> > >> This is my suggestion:
> > >> http://officewriter.softartisans.com...riter-372.aspx
> > >>
> > >> You can also do it with the Office bits, but they are a bit unwieldy
> > >>
> > >> --
> > >> Gregory A. Beamer
> > >> MVP, MCP: +I, SE, SD, DBA
> > >>
> > >> *************************************************
> > >> | Think outside the box!
> > >> |
> > >> *************************************************
> > >> "Gerhard" <Gerhard@xxxxxx> wrote in message
> > >> news:FAE5E381-54FD-47AC-88FE-B378BCF4DA94@xxxxxx
> > >> > I'm posting this again, as my first post was not answered.
> > >> >
> > >> > Is there is best practice example of how to create a Word document in
> > >> > vb.net
> > >> > version 2 web application that can be opened by a user. Basically the
> > >> > scenario is the client wants me to build a Word document with lots of
> > >> > formatting (fonts, headers, footers, etc).
> > >> >
> > >> > Thanks.
> > >> >
> > >> > Bob
> > >> >
> > >>
> > >>
> > >>
> >
> >
> >

My System SpecsSystem Spec
Old 08-01-2008   #2 (permalink)
Family Tree Mike


 
 

Re: Creating a Microsoft Word document - request 2

It sounds like you added a reference to the COM version. On the Net tab for
references you should see something similar to
Microsoft.Office.Interop.Word. This should then work, assuming you have an
Imports Microsoft.Office.Interop statement.


"Art" <Art@xxxxxx> wrote in message
news:7C88C1BC-10DF-4649-B835-3292506FAFD1@xxxxxx
Quote:

> Hello,
>
> I saw this posting and it is the closest place to ask this question. I am
> simply trying to create a Word document from a VB application I am wrting
> with Visual Studio 2005.
>
> I cut a pasted a simple routine within the 'click' sub-routine and I'm
> simple having a problem with resolving the statement 'Dim objWord As New
> Word.Application' where it is complaining about 'Word.Application' is not
> defined.
>
> I did add the reference to the Microsoft Word Object Library. Can one of
> you
> perhaps tell me why I cannot resolve this?
>
> Thanks in advance.
>
> "Gerhard" wrote:
>
Quote:

>> Thanks. This was very helpful.
>>
>> "Cowboy (Gregory A. Beamer)" wrote:
>>
Quote:

>> > I have not programmed against the Office libraries (Office bits) since
>> > 2001
>> > or 2002, so I would have nothing recent, if I still have samples.
>> >
>> > I would try something like this
>> > (http://www.codeproject.com/aspnet/wordapplication.asp) first.
>> >
>> > --
>> > Gregory A. Beamer
>> > MVP, MCP: +I, SE, SD, DBA
>> >
>> > *************************************************
>> > | Think outside the box!
>> > |
>> > *************************************************
>> > "Gerhard" <Gerhard@xxxxxx> wrote in message
>> > news:8331F307-6823-4BC6-ACD0-001AD6C67ED7@xxxxxx
>> > > Thanks. Any examples on the Office bits you mentioned?
>> > >
>> > > "Cowboy (Gregory A. Beamer)" wrote:
>> > >
>> > >> This is my suggestion:
>> > >> http://officewriter.softartisans.com...riter-372.aspx
>> > >>
>> > >> You can also do it with the Office bits, but they are a bit unwieldy
>> > >>
>> > >> --
>> > >> Gregory A. Beamer
>> > >> MVP, MCP: +I, SE, SD, DBA
>> > >>
>> > >> *************************************************
>> > >> | Think outside the box!
>> > >> |
>> > >> *************************************************
>> > >> "Gerhard" <Gerhard@xxxxxx> wrote in message
>> > >> news:FAE5E381-54FD-47AC-88FE-B378BCF4DA94@xxxxxx
>> > >> > I'm posting this again, as my first post was not answered.
>> > >> >
>> > >> > Is there is best practice example of how to create a Word document
>> > >> > in
>> > >> > vb.net
>> > >> > version 2 web application that can be opened by a user. Basically
>> > >> > the
>> > >> > scenario is the client wants me to build a Word document with lots
>> > >> > of
>> > >> > formatting (fonts, headers, footers, etc).
>> > >> >
>> > >> > Thanks.
>> > >> >
>> > >> > Bob
>> > >> >
>> > >>
>> > >>
>> > >>
>> >
>> >
>> >
My System SpecsSystem Spec
Reply

Thread Tools


Similar Threads
Thread Forum
Please I need your help - Error on opening Microsoft WORD Document VB Script
Send Word document by email from Word 2003 not working with WLM Live Mail
accidentally moved a MS Word document,now it dissapears everytime i open any word document Vista performance & maintenance
accidentally moved a MS Word document,now it dissapears everytime i open any word document Vista General
Creating Word document of Word 97-2003 file type on the New menu in Vista Vista General


Vista Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows Vista", the Start Orb, and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46