Results 1 to 4 of 4
  1. #1
    5 Star Lounger kmurdock's Avatar
    Join Date
    Feb 2003
    Location
    Pacific Grove, California, USA
    Posts
    661
    Thanks
    3
    Thanked 19 Times in 18 Posts

    Automate AutoText (Word XP / SP2)

    Is it possible this just can't be done with VBA?

    I have a global template with two AutoText entries in it. Manually, I can insert the AutoText into any document. If I try to automate this (with normal.dot as the attached template), I either get

    <pre>NormalTemplate.AutoTextEntries("DocID").Inser t Where:=Selection.Range, _
    RichText:=True</pre>


    -or-

    <pre>ActiveDocument.AttachedTemplate.AutoTextEntri es("DocID-").Insert Where:=Selection.Range, _
    RichText:=True</pre>


    Of course, normal.dot does not have this autotext entry -- I have checked and double-checked. And it must be true because when I try to run this code, I get a member-of-the-collection-does-not-exist error.

    Is this just one of those things you can do manually but not with automation? <img src=/S/scratch.gif border=0 alt=scratch width=25 height=29>

    Thanks, Kim

  2. Subscribe to our Windows Secrets Newsletter - It's Free!

    Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

  3. #2
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,508
    Thanks
    3
    Thanked 143 Times in 136 Posts

    Re: Automate AutoText (Word XP / SP2)

    Does this thread help?
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  4. #3
    5 Star Lounger kmurdock's Avatar
    Join Date
    Feb 2003
    Location
    Pacific Grove, California, USA
    Posts
    661
    Thanks
    3
    Thanked 19 Times in 18 Posts

    Re: Automate AutoText (Word XP / SP2)

    Why yes, it does indeed. Yippee! <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

    And now that I can see the "Search" link at the top of the page, I can find these things for myself!

    Thanks again, Kim

  5. #4
    Super Moderator
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,507
    Thanks
    0
    Thanked 4 Times in 4 Posts

    Re: Automate AutoText (Word XP / SP2)

    Search has been restored. Look at the top of the Lounge page for <font color=blue>Search</font color=blue>. Click it and see. Happy hunting. Don't wear it out. <img src=/S/grin.gif border=0 alt=grin width=15 height=15>
    -John ... I float in liquid gardens
    [acronym title="Gday mate!"][/acronym] [acronym title="What up Dude?"][/acronym] UTC -7±DS

Posting Permissions

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