outPutTo method

S

stephenson22

I am using above method with success.

The .rtf file is generated, however the formatting is lost. i.e the tabular
latyout of text in the Access report is not maintained in the .rtf.

How can I over come this issue?
 
S

stephenson22

Thank you.

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.

Stephne Lebans - can you help?
 
K

krissco

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
 
S

stephenson22

Your a champion.

How can I get the function to save the EMF file to a specific location
without prompting the user for input?
 
K

krissco

Your a champion.

How can I get the function to save the EMF file to a specific location
without prompting the user for input?

You should open the clsPrintToFit object found under Modules.

ExportToMSWord() calls
fCreateRTF() which will display a dialog when the variable
mShowFileDialog is true

You will notice that mShowFileDialog has been declared Private but is
exposed via the Property ShowFileDialog.

To accomplish what you are requesting, add these two lines to your
code prior to calling the ExportToMSWord() function.

pf.ShowFileDialog = False
pf.SaveFileName = "Specify Your Path And File Name Here"

-Kris
 

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