J
John Viescas
If you're willing to use the undocumented and unsupported SaveAsText and
LoadFromText methods of the Application object, then it might be possible to
create a new macro if you can figure out how to construct the text file
correctly. Here's the Text file for a macro that opens a report with a
filter (with the macro name and condition columns show, but no macro name or
condition specified):
Version =196611
ColumnsShown =3
Begin
Action ="OpenReport"
Argument ="rptCustomers"
Argument ="2"
Argument =""
Argument ="[CustomerID]=1"
Argument ="0"
End
I have no clue what the Version entry means - although you could guess it
from experimentally using SaveAsText on some sample macros.
The syntax for the two methods is pretty simple:
Application.SaveAsText acMacro, "<macro name>", "< file name >"
Application.LoadFromText acMacro, "<macro name>", "< file name >"
--
John Viescas, author
"Microsoft Office Access 2003 Inside Out"
"Running Microsoft Access 2000"
"SQL Queries for Mere Mortals"
http://www.viescas.com/
(Microsoft Access MVP since 1993)
LoadFromText methods of the Application object, then it might be possible to
create a new macro if you can figure out how to construct the text file
correctly. Here's the Text file for a macro that opens a report with a
filter (with the macro name and condition columns show, but no macro name or
condition specified):
Version =196611
ColumnsShown =3
Begin
Action ="OpenReport"
Argument ="rptCustomers"
Argument ="2"
Argument =""
Argument ="[CustomerID]=1"
Argument ="0"
End
I have no clue what the Version entry means - although you could guess it
from experimentally using SaveAsText on some sample macros.
The syntax for the two methods is pretty simple:
Application.SaveAsText acMacro, "<macro name>", "< file name >"
Application.LoadFromText acMacro, "<macro name>", "< file name >"
--
John Viescas, author
"Microsoft Office Access 2003 Inside Out"
"Running Microsoft Access 2000"
"SQL Queries for Mere Mortals"
http://www.viescas.com/
(Microsoft Access MVP since 1993)