If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
outPutTo method
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? -- Learning SQL and Access |
#2
|
|||
|
|||
outPutTo method
On Jul 9, 7:04 am, stephenson22
wrote: 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? -- Learning SQL and Access See if Lebans' code will work for you: http://www.lebans.com/ReportUtilities.htm -Kris |
#3
|
|||
|
|||
outPutTo method
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? -- Learning SQL and Access "krissco" wrote: On Jul 9, 7:04 am, stephenson22 wrote: 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? -- Learning SQL and Access See if Lebans' code will work for you: http://www.lebans.com/ReportUtilities.htm -Kris |
#4
|
|||
|
|||
outPutTo method
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 |
#5
|
|||
|
|||
outPutTo method
Your a champion.
How can I get the function to save the EMF file to a specific location without prompting the user for input? -- Learning SQL and Access "krissco" wrote: 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 |
#6
|
|||
|
|||
outPutTo method
On Jul 11, 8:02 am, stephenson22
wrote: Your a champion. How can I get the function to save the EMF file to a specific location without prompting the user for input? -- Learning SQL and Access 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 |
#7
|
|||
|
|||
outPutTo method
Works a treat - many thanks.
-- Learning SQL and Access "krissco" wrote: On Jul 11, 8:02 am, stephenson22 wrote: Your a champion. How can I get the function to save the EMF file to a specific location without prompting the user for input? -- Learning SQL and Access 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 |
Thread Tools | |
Display Modes | |
|
|