473,509 Members | 3,032 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Word Document or Report...which to use?

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
2 2177
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
7617
by: Jeff Harbin | last post by:
I've got an ACCESS 2000 application that I'm developing. One of the outputs of this app will be to generate a series of 'jobs' which corresponds to a record in the database. Each record will be...
8
3487
by: Mike MacSween | last post by:
tblCourses one to many to tblEvents. A course may have an intro workshop (a type of event), a mid course workshop, a final exam. Or any combination. Or something different in the future. At...
4
3350
by: svdh2 | last post by:
Dear All, I have lately strugled more and more with Access, what started as a simple database has brought me to the fundaments of Access. I need to transfer fields from various tables to a...
5
3073
by: feck | last post by:
Hi, Is there any code/routine to export a report as a word document retaining the formatting. I have a requirment to produce some fairly detailed statisitical reports for transmission by e-mail....
2
4380
by: kelly.pearson | last post by:
I had some access 97 reports that I used to publish to MS Word that worked before we upgraded to Access 2K and Word 2K. Although there were some minor discrepancies, I was able to tweak the access...
7
6215
by: Dave | last post by:
Apologies for the newbie question. I have created a vb.net program for my company that is designed to work with Word Templates (about forty of them that we commonly use) that are selected by the...
5
2584
by: rick m | last post by:
We have a fairly good sized Access database that contains some info on the children our agency sees. We also have 40+ templates that require some info from the database be inputted into them, such...
5
3725
by: jmar | last post by:
I posted a week ago and received one response. I'm looking for the opinion of several experienced .NET people before I proceed so I'm posting again. Sorry for the repost... I am updating a...
8
6684
by: babyangel43 | last post by:
Hello, I have a query set up in Access. I run it monthly, changing "date of test". I would like this query to be merged with a Word document so that the cover letter is created in Word, the fields...
0
7234
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7136
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7412
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7505
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
5060
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4730
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3216
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3203
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
441
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.