[AccessD] Export to where?

Stuart McLachlan stuart at lexacorp.com.pg
Mon Oct 13 17:56:53 CDT 2003


On 14 Oct 2050 at 8:26, Kath Pelletti wrote:

> In an application distributed recently, I added the standard Access
> menu option 'Export', 'Publish it with MS Word'. 
> 
> The client tells me that that option outputs the file to a network
> location and takes forever, and can the location be changed to C:\Temp
> for all machines. 
> 
> On the proviso that this is not an option that I can customise, I
> started to play with it and found that on my machine I control the
> output by nominating the folder under the Access menu [Tools]
> [Options] [General] 'Default database folder'. This is not apparently
> what my client finds - they find that it outputs to the 'last used
> folder in Word'. I have tried to test that and find that for me that
> is not the case. 
> 
> Can someone else give it a shot and let me know what you get? And is

On my Win2K with Access2K, it outputs to the folder specified in "[Options] [General] 'Default database folder".

> there a cleverer way to nominate the output folder? I would prefer a
> code option as there are multiple machines using the app. 
> 

Create your own menu option in place of the built in "Publish...".

Create a function:
Function Publish() As Long
If CurrentObjectType = acReport Then
 DoCmd.OutputTo acOutputReport, CurrentObjectName, _
    acFormatRTF, "C:\Temp\" & CurrentObjectName & ".rtf", True
End If
End Function

Create a one line macro called Publish with an action of RunCode and 
a function of Publish()

Add the macro to your report preview toolbar.


  

 
-- 
Lexacorp Ltd
http://www.lexacorp.com.pg
Information Technology Consultancy, Software Development,System 
Support.





More information about the AccessD mailing list