Results 1 to 6 of 6
  1. #1
    New Lounger
    Join Date
    Feb 2001
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Creating Autotext

    Hi

    A simple question? I have a table containing 150 rows and I want to turn each row into an autotext entry in word97 sr2 is it possible to do this using VBA or do I have to do it manually
    Thanks for any help
    Graham

  2. #2
    JustCallMeAl
    Guest

    Re: Creating Autotext

    So from this, you want 150 autotext entries, each consisting of a table row. Or asked another way, you will have 150 one-row tables in autotext. Is that what you would like?

    The main point of the question is if you want the autotext to contain a "table" or not.

  3. #3
    New Lounger
    Join Date
    Feb 2001
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Creating Autotext

    Hi Al
    What I would like is the contents of each row as a seperate entry ie 150 auto text entries, ideally without the table just the contents but that part is less important.
    Graham

  4. #4
    New Lounger
    Join Date
    Feb 2001
    Posts
    22
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Creating Autotext

    That worked as I wanted it to

    Thanks

  5. #5
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Creating Autotext

    Shazzam! <img src=/S/joy.gif border=0 alt=joy width=23 height=23>
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  6. #6
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Creating Autotext

    Without putting too much into it:

    <pre>Sub AutotextFromCells()
    Dim i As Long
    For i = 1 To ActiveDocument.Tables(1).Rows.Count
    NormalTemplate.AutoTextEntries.Add Name:="Row" & i, _
    Range:=ActiveDocument.Tables(1).Cell(i, 1).Range
    Next
    End Sub
    </pre>


    You'll have to remove the cell marker "character" (chr(13)& chr(7)) at the end of each entry with a stripper <img src=/S/moon.gif border=0 alt=moon width=15 height=15> function.
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

Posting Permissions

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