0

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.

2
Contributors
3
Replies
4
Views
6 Years
Discussion Span
Last Post by AndreRet
0

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
0

It's a pleasure. Happy coding.:)

:)

I'm lazy in creating reports, REALLY

:)

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

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.