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

    Shape in Autotext (Word 2002)

    <P ID="edit" class=small>(Edited by Kevin on 27-Mar-03 16:55. edited because i'm using the post as an IDE....)</P>Ok, this should be a no-brainer, but sumpuns wrong. How
    do I get a shape object (a graphic) into an autotext entry?

    This gives error:

    activedocument.shapes("Graphic").select
    attachedtemplate.autotextentries.add "ATName", selection.range
    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>

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Shape in Autotext (Word 2002)

    Insert <font face="Georgia">ActiveDocument.</font face=georgia> before AttachedTemplate

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

    Re: Shape in Autotext (Word 2002)

    Gee wiz. That's the answer. What's the logic there?
    Isn't activedocument the root by default. It's not like there's
    and application.attachedtemplate....

    I've been after this answer for years. Previous threads
    never landed the big tuna

    Thanks Hans.
    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>

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Shape in Autotext (Word 2002)

    I don't understand this either. But again, there are other examples of this kind of behavior. When you are coding inside an Office app (i.e. not from another app using Automation), Application is the assumed context. ActiveDocment, for example, is a property of the Application object; you don't have to write Application.ActiveDocument. But there are exceptions: ScreenUpdating = False won't work, Application.ScreenUpdating = False will...

  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: Shape in Autotext (Word 2002)

    Well, I appreciate the info. Bagged another item on the bug list and am printing
    envelopes again with return address and logo. I have previously used a
    work-around. But now, I've got a real clean solution...

    The project (converting from VBA to C#) will probably always require some
    VBA code, autotext, etc in a global template. Thus continuing posts here...
    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
  •