Exporting Access records to MS Word via VB6 front end app 
Author Message
 Exporting Access records to MS Word via VB6 front end app

I am stumped on how to export records (specific fields) from an Access
2000 DB to a Word doc using VB6.

I know how to merge or Mailmerge the database to Word Directly from
Access but was hoping someone out there has some experience with
writing the code to do this task directly from VB.  Especially
specific records/fields and getting them formatted as desired.

Any help is as always, very much appreciated.

Regards

Steve.



Thu, 24 Jul 2003 08:43:24 GMT  
 Exporting Access records to MS Word via VB6 front end app
One way is to create a template in Word that has all of the styles
defined that you need for the formatted results. Create bookmarks in
the template, then it's easy to insert specific rows or values from
your recordset in the bookmarked locations. If the styles are
pre-applied, then you don't need to reformat after the text is
inserted. You might want to pick up a good book on programming in Word
since the object model is a little convoluted.

-- Mary
Microsoft Access Developer's Guide to SQL Server
http://www.amazon.com/exec/obidos/ASIN/0672319446/mcwtechnologies/

Quote:

>I am stumped on how to export records (specific fields) from an Access
>2000 DB to a Word doc using VB6.

>I know how to merge or Mailmerge the database to Word Directly from
>Access but was hoping someone out there has some experience with
>writing the code to do this task directly from VB.  Especially
>specific records/fields and getting them formatted as desired.

>Any help is as always, very much appreciated.

>Regards

>Steve.



Fri, 25 Jul 2003 01:40:59 GMT  
 Exporting Access records to MS Word via VB6 front end app
I'm on my first program, but I just did this for the first time on a very
basic level after getting some advice from this list. Crystal Reports was
*not* viewed as a good option, so I "automated" or "programmed" Word.

It took a while to get the concept of why I would need a "Range" or a
"Selection" or a "Collapse method;" or what possible reason there would be
to use an InsertAfter method. But with these and some VB logic regarding the
ADO recordset fields, I was able to generate a fairly sophisticated Word
document. The neatest part is to leave screen updates on and watch it get
"typed" right before your eyes.

Searching www.msdn.microsoft.com on a specific object, like "InsertAfter,"
seemed to work best for me. Searching www.codehound.com on "Word automation"
was also helpful.

Peter Bradshaw


Quote:
> I am stumped on how to export records (specific fields) from an Access
> 2000 DB to a Word doc using VB6.

> I know how to merge or Mailmerge the database to Word Directly from
> Access but was hoping someone out there has some experience with
> writing the code to do this task directly from VB.  Especially
> specific records/fields and getting them formatted as desired.

> Any help is as always, very much appreciated.

> Regards

> Steve.



Sun, 27 Jul 2003 23:57:41 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Exporting Access records to MS Word vis VB6 front end app

2. VB6 (ADO) Front end to MS Access DB on Network Drive

3. Export Access Queries to a Word Doc via a VB6 Program

4. Exporting VB Front End For Access

5. Creating an app with a WORD front end?

6. Error Message Returned from Access via VB front end

7. MS Access 2002 vs VB.net as a front-end to SQL Server data

8. Using VB to make a front end for MS Access dbase

9. help: MS Access queries called from a VB front end

10. MS ACCESS 2.0 front end, and VB 5.0

11. help: MS Access queries called from a VB front end

12. App Security - front-end or back-end?

 

 
Powered by phpBB® Forum Software