Results 1 to 3 of 3
  1. #1
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Melbourne, Australia
    Posts
    1,294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    code to insert autotext entry - generating error

    Hiya
    Ive seen posts about templates & their Autotext entries.
    I did a search on this forum without success.

    I have code that inserts autotext entry into a footer.
    When I run code - I get runtime error 5941
    - The requested memeber of the collection doesnot exist.

    see below:

    Selection.MoveLeft Unit:=wdCharacter, Count:=1
    ActiveDocument.AttachedTemplate.AutoTextEntries(st rFooter1stPage).Insert _
    Where:=Selection.Range, RichText:=True

    The autotext entry is stored in a global template called CompanyAutotext.dot
    I remember some time ago someone mentioned that I had to set the path for the template which contains the autotext >
    is that right?

    TIA Diana

  2. #2
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts

    Re: code to insert autotext entry - generating error

    Hi Diana,

    See <A target="_blank" HREF=http://www.wopr.com/cgi-bin/w3t/showthreaded.pl?Cat=&Board=vb&Number=18205&page=&v iew=&sb=&vc=1#Post18205>this post</A> as well as the thread generally.<g>

    Gary

  3. #3
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Melbourne, Australia
    Posts
    1,294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thanks Gary thats exactly what I was looking for

    However I did a search on woodys lounge for 'Autotext' all forums.
    & didnt return anything.
    cheers Diana

Posting Permissions

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