I have set the reference to the ReportUtility. I have inserted the code to
run the CmdSaveRTF_Click()but I receive an erreor message stating object
required.
Open Stephen's form "ReportUtilities" in design mode. View the code
behind the form and look for the following:
'This statement is at the top of the module
Dim pf As clsPrintToFit
'This statement is in the Load event
Set pf = New clsPrintToFit
'This statement is executed when you click the "Export To Word" button
pf.ExportToMSWord "Your Report Name Goes Here"
'This statement is in the Unload event
Set pf = Nothing
It's just a guess, but maybe you are trying to call the function like
this?
ExportToMSWord "Your Report Name Goes Here"
Try this instead:
Public function myExportToMSWord(strReportName as string) as boolean
'Throw in some error trapping
'Perform all four actions of the form in one spot
dim pf as clsPrintToFit
set pf = new clsPrintToFit
pf.ExportToMSWord strReportName
set pf = nothing
end function
-Kris