Template Population

P

Peter S

How would I populate text boxes and check boxes on a ms word 2000 template
with data existing on a VB6 form?
 
D

Doug Robbins - Word MVP

P

Peter S

Doug,

Thank You for the reply, but I have some additional question.
I have a template that I customized with TextBox and CheckBox controls
created from the Control Toolbox toolbar. I use the following code to
automate word within VB6:

Set appWord = New Word.Application
Set doc = appWord.Documents.Open("C:\AuditDB\KPI\ACC_Form.dot")

MS Word version is 9.0 (2000)

The issue I am having is how do I refence the TextBox and CheckBox objects
to populate the data programmatically within VB6 code without the user
actually entering data into a ms word document.

I tried recording a macro while I open the template, but it seem that none
of my entries into the objects get recorded and therefore I can't see how
that vba in word translates the population of these objects.

I am an experienced SQL/VB/VBA programmer however I have not done ms word
automation for almost ten years and I have done it in the past, but do not
have the actual examples how I did it.

I hope my explanation is clear. Please let me know if there is a way I can
do this from VB6 without the user actually entering data into the word
template. It's like I want to treat ms word as report output of information
residing on a VB6 form that was queried from SQL Server.

Thx,
Peter
 

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