Consulting

Results 1 to 2 of 2

Thread: Parse a table in FrontPage

  1. #1

    Parse a table in FrontPage

    Hoping somebody can help.

    I'm new to VBA & I've a simple task which I figure any one of you wonderful VBA gurus would know how to do...

    I'm going to use Frontpage (fp) to create a html file mostly to allow a user to visually layout a table.

    When they've done this I want to have them run a VBA program to parse that single table and spit out some Smalltalk code (I know...) to say the clipboard.

    for each TR in the table
    append this text to the clipboard: ' layout addChild: ( TR,rowNum := TRView new). '

    for each TD in the TR
    append this text to the clipboard:
    ' TR+rowNum addChild: ( TD,rowNum,colNum := TDView new).'


    The idea is to generate a block of code adding 'child' TDs to their TRs.

    so for a 2 column 3 row table the desired generated output would be:

    "layout addChild: (TR1 := TRView new).
    TR1 addChild: (TD11 := TDView new).
    TR1 addChild: (TD12 := TDView new).
    layout addChild: (TR2 := TRView new).
    TR1 addChild: (TD21 := TDView new).
    TR1 addChild: (TD22 := TDView new).
    ayout addChild: (TR3 := TRView new).
    TR1 addChild: (TD31 := TDView new).
    TR1 addChild: (TD32 := TDView new)."


    Any and all help MUCH appreciated!

    Cheers,
    WB

  2. #2
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Hi WB
    Welcome to VBAX.
    I've never used FrontPage so don't know if I can assist, and I've not seen many (if any) questions relating to it. If you can post a sample file, though, I'll take a look. To post, use Manage Attachments which you'll find in the Go Advanced section.
    Regards
    MD
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •