Automation of Access-Word

Ron Bell

Registered User.
Local time
Today, 01:49
Joined
Jul 25, 2000
Messages
33
Help required to minimize a report (myreportname) without minimizing Word
at same time in OutputTo.

I wish ideally: when Previewing a report ( this seems necessary because of Filter requirements)

to then minimize that report (temp) then close it after Word has opened with result of OutputTo

I've done successful output to Word with filter, but, if I try to minimize a report preview with this code,
it also minimizes Word as it opens, HELP!!

Following is revelevant part of my Function so far:~

Function outputreportTEST(mydocname as string, Optional myfil as string)

'myreportname in following is Public variable, mydocname is name of report,
' myfil is filter set SQL on opening report.

DoCmd.OpenReport.myreportname. A_PREVIEW,,myfil

If CurrentProject.AllReports(myreportname).IsLoaded = True then
With CurrentProject.AllReports(myreportname)
DoCmd.Minimize
End With
End if

DoCmd.OutputTo acOutPutReport, myreportname, acFormatRTF,"Path of rtf", & .rtf, -1

End function
 

Users who are viewing this thread

Back
Top Bottom