Report Writing to MS Word Using VB6

U

Unni Menon

I need to write a report in MS Word using VB6 in the below format :

Format :

Page Heading :
"COMPANY NAME" (Page Centre,Font = Bold, Size=14,
Underline)
Sub Heading#1 :
"Something#1" (Page Centre,Font = Bold, Size=12, Underline)
Sub Heading#2 :
"Something#2" (Page Centre,Font = Bold, Size=11, Underline)
Sub Heading#3 :
"Something#3" (Page Centre,Font = Bold, Size=10, Underline)

Inside a "Do while ... Loop"

Data Line # 1
Data Line # 2
Data Line # 3
Data Line # 4
Data Line # 5
Data Line # 6
....

** Report ends here **

Awaiting to hear from any knowledgeable and helpful soul.

Thanks & Rgds
Menon.
 
U

Unni Menon

I wanted to "Create a Report" in the below format in MS Word ?
How to do it thru Visual Basic 6 code (program) is the question ?
The database is MS Access which will supply the correct recordset which
is not a problem. Getting the Heading, Sub Heading with the right
formatting as mentioned is the issue ? How to deal with it ?

Thanks & Awaiting to hear your valuable advise.
Menon.
********
 
J

Jezebel

Easiest way is to set up a template in Word. Use DocProperty fields for the
matter to go in the header rows. In your VB code, set the properties then
update fields. For the rest, you're just inserting text.
 
U

Unni Menon

Dear Jezebel,
Thanks your advise n patience.
Can you please advise how same can be done. Do you have some example/
samples of files.

In this case, except "Page Heading", the Content of "Sub Heading#X" changes
i.e.
Sub Heading # 1 will be "Outstanding Report : Period From Date to To Date"
Sub Heading # 2 will be "Export / Import or Other Data"
Sub Heading # 3 will be "Heading of the Display Fields for Data Line"

Can you pls advise step by step.

Thanks & Rgds
Menon.
***********
 
J

Jezebel

This is all well covered in Help. Step by step instructions here would be
heaping Pelion upon Ossa.
 

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