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
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