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

  • Thread starter Thread starter Toine
  • Start date Start date
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!
 
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.
 
Back
Top