From VB.NET to Word 2003

P

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
 
C

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/...1e-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
 
S

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
 
P

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.
 
S

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top