Ok, im having a long time creating reports for my program.

I would like to ask if it is possible to connect my program

to an existing msword file.

E.g:

If i click a button on my form, lets say cmdLeaveReport,

an msword file named leavereport.doc will open (of course in word window that is)

Is it possible, any example.?

Only a report, not connected to my Dbase at all.

Recommended Answers

All 3 Replies

Yes it is possible.

You'll need to add a Reference to Microsoft Word Object Library (with the Tools, References menu)

Dim wrdApp As New Word.Application
wrdApp.Documents.Open "E:\My Documents\ReadMe.doc"
wrdApp.Visible = True

Thanks so much.

I'm lazy in creating reports, REALLY.

//SOLVED

It's a pleasure. Happy coding.:)

:)

I'm lazy in creating reports, REALLY

:)

Trust me, you're not the only one....

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.