Can I automate exporting an Access report as a .rtf file?

S

Spottie

I am attempting to use the transferdatabase method in Access 2002 but it
seems you can only export a report to another database. Is there a way to
export as a .rtf file to a location on oyr LAN accessable to other users?
 
J

Jeff C

--
Jeff C
Live Well .. Be Happy In All You Do


Spottie said:
I am attempting to use the transferdatabase method in Access 2002 but it
seems you can only export a report to another database. Is there a way to
export as a .rtf file to a location on oyr LAN accessable to other users?

There are other methods: Try this

Access
OutputTo Method [Access 2003 VBA Language Reference]
The OutputTo method carries out the OutputTo action in Visual Basic.

expression.OutputTo(ObjectType, ObjectName, OutputFormat, OutputFile,
AutoStart, TemplateFile, Encoding)

expression Required. An expression that returns a DoCmd object.

AcOutputObjectType
AcOutputObjectType can be one of these AcOutputObjectType constants.
acOutputDataAccessPage Not supported.
acOutputForm
acOutputFunction
acOutputModule
acOutputQuery
acOutputReport
acOutputServerView
acOutputStoredProcedure
acOutputTable

ObjectName Optional Variant. 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.

AcFormat
AcFormat can be one of these AcFormat constants.
acFormatASP
acFormatDAP
acFormatHTML
acFormatIIS
acFormatRTF
acFormatSNP
acFormatTXT
acFormatXLS

OutputFile Optional Variant. 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 Optional Variant. 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 Optional Variant. A string expression that's
 

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