Creating a Microsoft Word document - request 2

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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!
|
*************************************************
 
Thanks. This was very helpful.

Cowboy (Gregory A. Beamer) said:
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!
|
*************************************************
 
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.
 
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.
 
Thank you Family Tree Mike. You are correct that all I did was add the
reference from the .com tab. I looked over the .net tab but do not see a
similar statement there. I'm running Office 2007 and Visual Studio 2005. I
may have upgraded from Office 2003 after Visual Studio 2005 was loaded onto
my system. But do you know how to add this statement into the .net tab so
that the reference can be added. Thanks again and appreciate the help.....Art
 
Thank you. Somehow everything resolved itself. Don't know how but everything
is building just fine. Thanks again
 
Back
Top