Hi All,
I was wondering if anybody knows using a command button on a form, how to open a word document, execute a print then return to a form automatically??? if anybody could help you would be saving me alot of time?
Thanks in advance
Andy!
Well, you can use OutputTo to output data to a Word document in rtf format and automatically open Word to view it. It doesn't seem to automate printing though.
objecttype One of the following intrinsic constants:
acOutputForm
acOutputModule
acOutputQuery
acOutputReport
acOutputTable
objectname A string expression that's the valid name of an object of the type selected by the objecttype argument. If you want to output the active object, specify the object's type for the objecttype argument and leave this argument blank.
If you run Visual Basic code containing the OutputTo method in a library database, Microsoft Access looks for the object with this name first in the library database, then in the current database.
outputformat One of the following intrinsic constants:
acFormatActiveXServer
acFormatHTML
acFormatIIS
acFormatRTF
acFormatTXT
acFormatXLS
If you leave this argument blank, Microsoft Access prompts you for the output format.
outputfile A string expression that's the full name, including the path, of the file you want to output the object to.
If you leave this argument blank, Microsoft Access prompts you for an output file name.
autostart Use True (–1) to start the appropriate Microsoft Windows–based application immediately, with the file specified by the outputfile argument loaded. Use False (0) if you don't want to start the application. This argument is ignored for Microsoft Internet Information Server (.htx, .idc) files and Microsoft ActiveX Server (*.asp) files.
If you leave this argument blank, the default (False) is assumed.
templatefile A string expression that's the full name, including the path, of the file you want to use as a template for an HTML, HTX, or ASP file. Have fun! )
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.