Howto: Export all Forms into text file[s]

  • Thread starter Thread starter Paul Guides
  • Start date Start date
P

Paul Guides

Hi!

Is it possible to export one or all forms of an
Access MDB into one or more text files?

The result should be something like the contents
of a Visual Basic .FRM file; a combination of
form controls descriptions and VB source code.
But this is no requirement, any textual format
would suffice, even XML would do.

Are there any third-party tools for this task?

TIA
Paul
 
Hi Paul,

There is an undocumented way of doing this (meaning use at your own risk!)

Application.SaveAsText acForm, strFormName, strDestPath
Application.LoadFromText acForm, strFormName, strSourcePath

For example:

Application.SaveAsText acForm, "FormA", "c:\temp\FormA.txt"
Application.LoadFromText acForm, "FormA2", "c:\temp\FormA.txt"

I've used this as a method for repairing a corrupt form object. How do you
plan on using these text files?
 
Hi Sandra,

thank you!

Paul
Sandra Daigle said:
Hi Paul,

There is an undocumented way of doing this (meaning use at your own risk!)

Application.SaveAsText acForm, strFormName, strDestPath
Application.LoadFromText acForm, strFormName, strSourcePath

For example:

Application.SaveAsText acForm, "FormA", "c:\temp\FormA.txt"
Application.LoadFromText acForm, "FormA2", "c:\temp\FormA.txt"

I've used this as a method for repairing a corrupt form object. How do you
plan on using these text files?


--
Sandra Daigle
[Microsoft Access MVP]
For the benefit of others please post all replies to this newsgroup.


Paul said:
Hi!

Is it possible to export one or all forms of an
Access MDB into one or more text files?

The result should be something like the contents
of a Visual Basic .FRM file; a combination of
form controls descriptions and VB source code.
But this is no requirement, any textual format
would suffice, even XML would do.

Are there any third-party tools for this task?

TIA
Paul
 
Back
Top