Word Document or Report...which to use?

J

jmar

I am updating a VB4.0 quote generation program to VB.net. The old
program takes user inputs, performs calculations, saves the data to
Access databases and uses Crystal Reports 5.0 to generate a quote. A
while back users obviously wanted to be able to edit/e-mail the quote
(these ancient Cyrstal 5.0 reports don't allow PDF creation) so I
modified the old VB4.0 code to allow users to save the Crystal Report
as Word document which they can then edit/e-mail from Word. This works
OK but there are two big downfalls: 1) the initial report data is
saved in the database and the modifications made in Word are not so you
end up with database data that isn't accurate 2) The conversion of
the Crystal Report to Word is clunky - the Word document that is
generated is touchy when it comes to editing - blocks of data move in
an unpredictable fashion when data is added.

As I upgrade this program to VB.net, I am trying to clean up this whole
issue. Users have loved the ability to edit/e-mail so I'm thinking the
way to go in VB.net is to forego storing in databases and simply have
my application fill in a Word Template with the quote data. Instead of
a database with quote data, they end up with a collection of Word
Documents, each representing an individual quote.

I need some input - feel free to offer your comments/suggestions on any
or all of the following:
1) Is this a good idea? Am I overlooking an advantage to the database
method?
2) Does anyone have any links/samples that show me how to easily fill
a Word Template from VB.Net 2003?
3) Can I set up the Bill of Material part of my template such that if a
user changes the cost of a line item the TOTAL is changed at the
bottom? If so, how?
4) Has anyone who has done this before have any words of
wisdom/experiences they could share as to the difficulty/issues they
faced?

Thanks in advance for any help...
Jmar
 
S

Scott M.

The feature you are looking for in Word is called "fields" (on the insert
menu). To access them, you need to be programming with the Word object
model (by making a reference from VS.NET to the COM Word Object Library).

While I haven't programmed against fields in Word, I would suspect you would
access specific fields via a "fields" property of the document object.

Yes, you can have a field set up that will update if other fields on the
form change, BUT (if memory serves) normally, you have to press F9 in Word
after making a change to a field for the rest of the fields to update. But,
you could easily add a nice (easy to see) button to your Word template that
says something like "Click Me After Making Changes To Update Your Form".
 
J

jmar

Scott,

Thanks for your response. I'm looking for others out there who could
also share their experience/opinions on how I should proceed.

Jmar
 

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