Open word document in access, scroll through it and print it

T

Toine

I want to view a Word document within MS Access 2000 and I also want
to scroll through the tekst and print the document if necessary.
Now I use a hyperlink that automatically opens MS Word but if you
close Word you have to manually select MS access again to go back to
the database.
So is it possible to open, view (and scroll) and print the document
from within access??

Thanks in advance!
 
P

pietlinden

Yes, it's called automation.


Public Function PrintMyDoc(ByVal strFileName As String)
Dim appWord As Word.Application

With appWord
.Open strFileName
.PrintOut
.Documents(strFileName).Close
'actually you should use fIsAppRunning from AccessWeb, and only
quit if
'fIsAppRunning was false.
.Quit
End With

Set appWord = Nothing
End Function

scroll to the end? Don't know... you could record a macro to find out,
though.
 

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