SaveAsText

  • Thread starter Thread starter George
  • Start date Start date
G

George

How can I save a macro to text when my program is in a
different mdb from the mdb that contains the macros.
SaveAsText appears only to work in the "current" database.

I would hope for
app.DoCmd.SaveAsText _
acMacro, "C:\Temp\Macro.txt", "MyMacro"

Where app is the application that refers to the database
that contains the macro(s) to be saved as text.
But app.DoCmd does not support SaveAsText.

Thank you in advance for any help.

George
 
Thank you.
I think DoCmd does not support SaveAsText.
I got "Method or data member not found"
Is there another way to save a macro (in another mdb)
as text?
 
George said:
Thank you.
I think DoCmd does not support SaveAsText.
I got "Method or data member not found"
Is there another way to save a macro (in another mdb)
as text?

SaveAsText is a method of the Application object, not of DoCmd. Also,
you've got the arguments swapped. If app is an Access Application
object with an open database, then

app.SaveAsText acMacro, "MyMacro", "C:\Temp\Macro.txt"

ought to work.
 
Yes, it did.
Thank you
George
-----Original Message-----


SaveAsText is a method of the Application object, not of DoCmd. Also,
you've got the arguments swapped. If app is an Access Application
object with an open database, then

app.SaveAsText acMacro, "MyMacro", "C:\Temp\Macro.txt"

ought to work.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)


.
 
Back
Top