A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Setting Up & Running Reports
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

outPutTo method



 
 
Thread Tools Display Modes
  #1  
Old July 9th, 2007, 04:04 PM posted to microsoft.public.access.reports
stephenson22
external usenet poster
 
Posts: 31
Default 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  
Old July 9th, 2007, 07:40 PM posted to microsoft.public.access.reports
krissco
external usenet poster
 
Posts: 167
Default 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  
Old July 11th, 2007, 12:52 PM posted to microsoft.public.access.reports
stephenson22
external usenet poster
 
Posts: 31
Default 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  
Old July 11th, 2007, 03:38 PM posted to microsoft.public.access.reports
krissco
external usenet poster
 
Posts: 167
Default 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  
Old July 11th, 2007, 05:02 PM posted to microsoft.public.access.reports
stephenson22
external usenet poster
 
Posts: 31
Default 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  
Old July 11th, 2007, 07:20 PM posted to microsoft.public.access.reports
krissco
external usenet poster
 
Posts: 167
Default 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  
Old July 16th, 2007, 11:30 AM posted to microsoft.public.access.reports
stephenson22
external usenet poster
 
Posts: 31
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:20 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.