code documentor

J

JohnE

Hello. This is an inquiry wondering what others in the ng use for code
documentors for Access? I am aware of VSS but that is a no go for this.
About what I need is very similiar to the Access Documentor for code only but
I can not have the line numbering included like the Access Documentor has.
Is anyone aware of a code documentor to use?
Thanks.
john
 
F

fredg

Hello. This is an inquiry wondering what others in the ng use for code
documentors for Access? I am aware of VSS but that is a no go for this.
About what I need is very similiar to the Access Documentor for code only but
I can not have the line numbering included like the Access Documentor has.
Is anyone aware of a code documentor to use?
Thanks.
john

Is this what you are looking for? It will create a .txt file for each
module in the database. No line numbers.

Public Sub OutputAModule()
On Error GoTo OutPutModules_Error
Dim strMyloc As Variant
Dim strMyMsg As String
Dim strMyTitle As String
Dim db As Database
Dim strModuleName As String
Dim intI As Integer
Dim mdl As Module
Dim strMyExt As String
Dim strDisplayError As String
Dim strNewMsg As String
Dim strNewLoc As String

Set db = CurrentDb()

strMyloc = "C:\MyFolderName"
If Right(strMyloc, 1) = "\" Then strMyloc = Left(strMyloc, _
Len(strMyloc) - 1)
strMyExt = ".txt"
For intI = 0 To db.Containers("Modules").Documents.Count - 1
strModuleName = db.Containers("Modules").Documents(intI).Name
strNewLoc = strMyloc & "\" & strModuleName & strMyExt
DoCmd.OutputTo acOutputModule, strModuleName, acFormatTXT, _
strNewLoc, 0
Next intI
strNewMsg = intI & " Module Objects Exported" & Chr(13) &
Chr(10)
strNewMsg = strNewMsg & "to " & strMyloc & "."
MsgBox strNewMsg, vbOK, "Export Objects"

Exit_OutPutModules:
Exit Sub

OutPutModules_Error:
strMyTitle = "Error in Procedure: OutPutTo ; Module: " & mdl
strMyMsg = "Error Number: " & Err.Number & Chr(13) & Chr(10)
strMyMsg = strMyMsg & "Error Description :" & Err.Description
& _
Chr(13) & Chr(10)
MsgBox strMyMsg, vbExclamation, strMyTitle
Resume Exit_OutPutModules

End Sub
 
J

JohnE

Fred, WOW. Thanks. I will be able to connect this to a button on the main
menu. Is there a way that will combine all the code from the modules and
forms into one txt file? That is what the guys responsible for
storing/documenting the code are looking for.
Thanks again.
john
 
F

fredg

Fred, WOW. Thanks. I will be able to connect this to a button on the main
menu. Is there a way that will combine all the code from the modules and
forms into one txt file? That is what the guys responsible for
storing/documenting the code are looking for.
Thanks again.
john

*** Snipped ***
Regarding: Is there a way that will combine all the code from the
modules and forms into one txt file?

I don't know how to do that from within Access, but it took me just a
few seconds to create a Word document and use the Insert menu to
insert 4 separate sample .txt files into the one Word document.

From Word, click on Insert + File. When the dialog opens, navigate to
the folder you have sent the individual .txt files to.
Set the "Files of Type" drop-down to All Files (*.*).
Select all of them at once. Click OK.

You may want to tidy the Word document up by inserting page breaks at
the appropriate places between the inserted text. That shouldn't take
long.
 
J

JohnE

Thanks. I (or the storage guys) will combine as you mentioned. The code you
provided is for modules, which is all that would run. What would be the code
for getting all the form code into txt files as well?
Thanks again.
John
 
F

FMS Development Team

Hello.  This is an inquiry wondering what others in the ng use for code
documentors for Access?  I am aware of VSS but that is a no go for this..  
About what I need is very similiar to the AccessDocumentorfor code only but
I can not have the line numbering included like the AccessDocumentorhas.
Is anyone aware of a codedocumentorto use?
Thanks.
john

Have you checked out our Total Access Analyzer program? It performs
extensive VBA code analysis ranging from nice code printouts to
detection of errors and ways to improve your code. Fo instance,
unused variables, procedures, and classes; procs that could be
private, reserved word conflicts, procs without error handling,
variables assigned but never used, etc.

In addition to code it performs a lot more analysis than the Database
Documenter on the rest of your Access objects.

For more info visit http://www.fmsinc.com/MicrosoftAccess/BestPractices.html

A comparison with the database documentor is here:
http://www.fmsinc.com/Products/analyzer/compare.htm

Good luck!

Luke Chung
FMS, Inc.
http://www.fmsinc.com

P.S. Visit our Micosoft Access Help Center for more resources:
http://www.fmsinc.com/MicrosoftAccess/help.html
 

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

Similar Threads

documentation 2
Documentor Leaves Code Window Open 1
documentor 5
how to analyze a database 2
Dynamic Naming of Form Button 3
Object Documentor 3
Simple way to document DB objects 2
Need help modifying code 0

Top