Howto: Export all Forms into text file[s]

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
 
S

Sandra Daigle

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

Paul Guides

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
 

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