SaveAsText

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
 
D

david epsom dot com dot au

Set Obj = GetObject("c:\myapp.mdb")
obj.docmd.saveastext....


(david)
 
G

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?
 
D

Dirk Goldgar

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.
 
G

Guest

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)


.
 

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