By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,827 Members | 2,177 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,827 IT Pros & Developers. It's quick & easy.

Word Document or Report...which to use?

P: n/a
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

Sep 24 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
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".

"jmar" <jm******@yahoo.comwrote in message
news:11*********************@i42g2000cwa.googlegro ups.com...
>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

Sep 24 '06 #2

P: n/a
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

Scott M. wrote:
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".

"jmar" <jm******@yahoo.comwrote in message
news:11*********************@i42g2000cwa.googlegro ups.com...
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
Sep 30 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.