In Access 2003 I used the following command within the report Activate Event to change the default directory...
Application.SetOption "Default Database Directory", gstrReportsDirectory
...where gstrReportsDirectory is a global variable containing the required directory name.
Then, with the report in preview mode, I could select the 'Tools / Office Links / Publish It With Microsoft Word' menu option to create an RTF file in the default directory with no further user involvement.
In Access 2007, however, the menu option has been replaced by 'Export To RTF File' in the ribbon. Selecting this option displays a dialog box showing a default directory of 'My Documents' and gives the user the option to select an alternative directory.
Is there any way:
1) To change the default directory in the dialog box (The VBA command Application.SetOption "Default Database Directory", gstrReportsDirectory appears to be ignored in Access 2007).
2) To automatically output the RTF file to a VBA-specified directory without any user involvement at all.
The new 'PDF' ribbon option has the same 'problem' as 'Export To RTF File' - again I would like to automatically create the PDF file in a directory of my choosing.
Thanks in advance for any ideas!
Regards, Tony.
Application.SetOption "Default Database Directory", gstrReportsDirectory
...where gstrReportsDirectory is a global variable containing the required directory name.
Then, with the report in preview mode, I could select the 'Tools / Office Links / Publish It With Microsoft Word' menu option to create an RTF file in the default directory with no further user involvement.
In Access 2007, however, the menu option has been replaced by 'Export To RTF File' in the ribbon. Selecting this option displays a dialog box showing a default directory of 'My Documents' and gives the user the option to select an alternative directory.
Is there any way:
1) To change the default directory in the dialog box (The VBA command Application.SetOption "Default Database Directory", gstrReportsDirectory appears to be ignored in Access 2007).
2) To automatically output the RTF file to a VBA-specified directory without any user involvement at all.
The new 'PDF' ribbon option has the same 'problem' as 'Export To RTF File' - again I would like to automatically create the PDF file in a directory of my choosing.
Thanks in advance for any ideas!
Regards, Tony.