Accessing "Publish It With Word" through Code

J

JohnV

When you have a report open there is an icon on the tool
bar that is "Publish it with Word". Is there a way to
programmtically launch the report in word instead of
having to have the user click the icon?

Thanks,
JohnV
 
T

TC

See if there is a RunCommand constant for it (I don't have Access here to
check).

HTH,
TC
 
J

JohnV

Thanks for the tip. Here is what I found:

DoCmd.OutputTo ObjectType:=acOutputReport, _
ObjectName:=strACReport, _
OutputFormat:=acFormatRTF, _
OutputFile:=strRTFFile, _
AutoStart:=True

The problem I was having with not launching Word was that
I did not have my reference for "Microsoft Office 9.0
Object Library" selected. It seemed as if the report would
run but nothing would happpen. Now Word launches.

JohnV
 

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