Menu

Not creating docs for VBA code

Support
livefree75
2015-09-08
2015-09-10
  • livefree75

    livefree75 - 2015-09-08

    I have a bunch of modules I exported from my Excel VBA. There are regular modules (.bas extension) and Class modules (.cls extension). I have a whole bunch of Natural Docs-style documentation in there. e.g.

    ''
    ' File: AA_MacroCode.bas
    '
    ' This module handles the main operation of the Update processing.
    '
    ' Copyright:
    '   Copyright © 2015 mycompany. All Rights Reserved
    '
    ' Author:
    '   The Author at xxx@mycompany.com
    '
    ' Version history:
    '
    ' (start table)
    ' Branch      Ver Eng AI # SLOC Description
    ' ----------- --- --- ---- ---- ----------------------------------------
    ' bldmat-v1    1  jlp 2304  148 Initial version
    ' (end table)
    
    ''
    ' Method: CallRe
    '
    ' Returns a *RegExp* object used to match a Call number.
    '
    ' Returns:
    '   RegExp - The regular expression object.
    '
    Public Property Get CallRe() As RegExp
    
        If IsNothing(pCallRe) Then
            Set pCallRe = New RegExp
            pCallRe.Pattern = "^[A-Z]{2}\d{2}"
        End If
        Set CallRe = pCallRe
    
    End Property
    

    Here's my NaturalDocs line:
    NaturalDocs -i directory -o FramedHTML docs -p NaturalDocsData

    I'm getting the following folders & files in the "docs" folder, but obviously it's not picking anything up:
    - index/
    - javascript/
    - javascript/main.js
    - javascript/prettify.js
    - javascript/searchdata.js
    - search/
    - style/
    - style/main.css
    - menu.html

    But of course, no index.html or any other content. It says it's parsing 15 files.

    What could I be doing wrong?

    Jamie

     

    Last edit: livefree75 2015-09-08
  • Greg Valure

    Greg Valure - 2015-09-10

    You're using Javadoc-style comments with two apostrophes on the first line. This is confusing Natural Docs because it removes the first apostrophe from each line and then it sees that the first line of content doesn't have a keyword (it's just an apostrophe) so it thinks it's not a Natural Docs comment and skips it. Languages with full support can use Javadoc-style comments but VB isn't one of them.

    If you use a single apostrophe on each line it works. Or you can switch to Natural Docs 2.0 which allows all languages to use Javadoc-style comments and you won't have to change anything.

    2.0 is here: https://sourceforge.net/p/naturaldocs/discussion/279268/thread/f000bbe6/

     

Log in to post a comment.