Home All Groups Group Topic Archive Search About

From VB.NET to Word 2003

Author
31 Mar 2006 7:52 AM
Pieter Coucke
Hi,

With my VB.NET 2003 application I want to generate reports in Word 2003.
I should be able to:
- use eventually some template (with the header of the company etc) and ad
my info to the document
- be able to add an image
- be able to add and fill tables

But all of this should have a flexibility for the users to add the text etc
themselves, without the word-document losing all his formattings etc.

What are the possibilites? I read something about WordXml? Would there be a
way to 'host' the Word-document in my application?
Is there some way to add some kind of parameters/fields to a template that
can be filled easily with an VB.NET-application?

Any helps, hints, directions, links would be great.

Thanks a lot in advance,

Pieter

Author
31 Mar 2006 8:54 AM
Cor Ligthert [MVP]
Hi Pieter,

It is always nice to see a new name in this newsgroup.

I never did what you ask for in VB net. But of course is Interop for it.

However some years ago somebody was struggling with something like this as
well.

I gave him the advice to try HTML, because that is quiet easy to handle in
VBNet as well as it is in modern Office versions. He wrote back if I thought
that his company was not a profesional organisation and that HTML was for
amateurs. That it is not it is the predecessor of WordXML and the successor
of SGML

Only if you don't succeed of course by interop or WordXML

Some links if you don't have them already for 2003

Office
http://support.microsoft.com/default.aspx?scid=kb;EN-US;311452

http://msdn.microsoft.com/office/

Pia Download
http://www.microsoft.com/downloads/details.aspx?FamilyID=c41bd61e-3060-4f71-a6b4-01feba508e52&displaylang=en

HOW TO: Call a Visual Basic .NET Class Library from Visual Basic for
Applications in Microsoft Office
http://support.microsoft.com/?kbid=317535

Cor
Author
2 Apr 2006 3:40 AM
vbnetdev
LOL. I guess it all depends on the situation.

--
Get a powerful web, database, application, and email hosting with KJM
Solutions
http://www.kjmsolutions.com



Show quote
"Cor Ligthert [MVP]" <notmyfirstn***@planet.nl> wrote in message
news:uhw0JCKVGHA.5808@TK2MSFTNGP12.phx.gbl...
> Hi Pieter,
>
> It is always nice to see a new name in this newsgroup.
>
> I never did what you ask for in VB net. But of course is Interop for it.
>
> However some years ago somebody was struggling with something like this as
> well.
>
> I gave him the advice to try HTML, because that is quiet easy to handle in
> VBNet as well as it is in modern Office versions. He wrote back if I
> thought that his company was not a profesional organisation and that HTML
> was for amateurs. That it is not it is the predecessor of WordXML and the
> successor of SGML
>
> Only if you don't succeed of course by interop or WordXML
>
> Some links if you don't have them already for 2003
>
> Office
> http://support.microsoft.com/default.aspx?scid=kb;EN-US;311452
>
> http://msdn.microsoft.com/office/
>
> Pia Download
> http://www.microsoft.com/downloads/details.aspx?FamilyID=c41bd61e-3060-4f71-a6b4-01feba508e52&displaylang=en
>
> HOW TO: Call a Visual Basic .NET Class Library from Visual Basic for
> Applications in Microsoft Office
> http://support.microsoft.com/?kbid=317535
>
> Cor
>
Author
6 Apr 2006 7:24 AM
Pieter
Thanks Cor, there are some really usefull links in it!
Author
5 Apr 2006 1:31 PM
Steve B.
Visual Studio 2005 and the .Net framework allows you to create "reports"
(using something very closed to the Sql Reporting services, but without the
server features).
The generated reports can be exported into several formats, including the
PDF format, or excel or HTML (don't remember if Word is included too).

This incredibly increases the developpement of reports generation.

HTH,
Steve

"Pieter Coucke" <pietercou***@hotmail.com> a écrit dans le message de news:
ObN4KgJVGHA.1***@TK2MSFTNGP11.phx.gbl...
Show quote
> Hi,
>
> With my VB.NET 2003 application I want to generate reports in Word 2003.
> I should be able to:
> - use eventually some template (with the header of the company etc) and ad
> my info to the document
> - be able to add an image
> - be able to add and fill tables
>
> But all of this should have a flexibility for the users to add the text
> etc themselves, without the word-document losing all his formattings etc.
>
> What are the possibilites? I read something about WordXml? Would there be
> a way to 'host' the Word-document in my application?
> Is there some way to add some kind of parameters/fields to a template that
> can be filled easily with an VB.NET-application?
>
> Any helps, hints, directions, links would be great.
>
> Thanks a lot in advance,
>
> Pieter
>
Author
6 Apr 2006 7:26 AM
Pieter
Do you mean the Crystal Reports? Or via the Reportviewer (actually Reporting
Services).

Crystal Reports can export to Word, but not in a 'nice' format: all the text
is placed in Text Boxes: So if you add text in one Text Box, it will come in
front of the others instead of moving everything nicely.
Author
6 Apr 2006 7:43 AM
Steve B.
No crystal reports required (good news).

Right click on your project, select Add new item, you will find a "Report"
template (rldc extention).

This reports is included in the Framework and is very close to what
reporting services can do (the report format is the same).
Reporting services added value is the server features (reports
subscriptions, reports web services, etc...). But reports rendering can be
used with VS 2005 and .Net 2.0 without reporting services.

Take a look at our new beta product (free) :
http://mentor.airsoftconsulting.com/

There is a section of the application that can generate reports locally.

Steve


"Pieter" <pietercou***@hotmail.com> a écrit dans le message de news:
ehnqwtUWGHA.4***@TK2MSFTNGP04.phx.gbl...
Show quote
> Do you mean the Crystal Reports? Or via the Reportviewer (actually
> Reporting Services).
>
> Crystal Reports can export to Word, but not in a 'nice' format: all the
> text is placed in Text Boxes: So if you add text in one Text Box, it will
> come in front of the others instead of moving everything nicely.
>

AddThis Social Bookmark Button