Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / March 2008

Tip: Looking for answers? Try searching our database.

Edit autotext entries

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Fredrik - 06 Mar 2008 15:41 GMT
Hello,

I have a template with several autotext entries. The entries are
different addresses that can be entered in the footer area with a
macro button. I'm looking for a way to edit parts of the autotext
entries without having to insert them, edit them in the document and
re-save them with the same name.
Tony Jollans - 06 Mar 2008 16:50 GMT
Sorry, there is no way to do this. Autotext entries, themselves, cannot be
edited in Word.

Signature

Enjoy,
Tony

> Hello,
>
[quoted text clipped - 3 lines]
> entries without having to insert them, edit them in the document and
> re-save them with the same name.
Fredrik - 06 Mar 2008 17:23 GMT
On 6 Mar, 17:50, "Tony Jollans" <My forename at my surname dot com>
wrote:
> Sorry, there is no way to do this. Autotext entries, themselves, cannot be
> edited in Word.

This seems strange. It is possible to add autotext entries through
VBA, it seem to me there should be a way to edit them too.

--
Fredrik. E. Nilsen
http://fenilsen.wordpress.com
Tony Jollans - 06 Mar 2008 17:39 GMT
You can do through VBA the same as you can do through the UI - that is, add
AutoText entries but not change them.

Signature

Enjoy,
Tony

> On 6 Mar, 17:50, "Tony Jollans" <My forename at my surname dot com>
> wrote:
[quoted text clipped - 8 lines]
> Fredrik. E. Nilsen
> http://fenilsen.wordpress.com
Fredrik - 06 Mar 2008 18:02 GMT
On 6 Mar, 18:39, "Tony Jollans" <My forename at my surname dot com>
wrote:
> You can do through VBA the same as you can do through the UI - that is, add
> AutoText entries but not change them.

Ok, thanks for helping!

--
Fredrik E. Nilsen
http://fenilsen.wordpress.com
fumei - 06 Mar 2008 18:37 GMT
You pull in the contents of an AutoText, delete that AutoText, edit what you
pulled in, and create the AutoText with the same name.  This seems bad form
to me.

In any case, that is the best you can do.  There is no editing of an AutoText
entry itself.

>On 6 Mar, 18:39, "Tony Jollans" <My forename at my surname dot com>
>wrote:
[quoted text clipped - 6 lines]
>Fredrik E. Nilsen
>http://fenilsen.wordpress.com
Lene Fredborg - 06 Mar 2008 21:52 GMT
You _can_ actually change the contents of an AutoText without inserting the
AutoText. You do this by setting the Value property.

Example: you want to replace the string “abc” in all AutoText entries in a
specific template (here MyTemplate) with “12345”. To do this:

   Dim oAutoText As AutoTextEntry

   For Each oAutoText In MyTemplate.AutoTextEntries
       oAutoText.Value = Replace(oAutoText.Value, "abc", "12345")
   Next oAutoText

Signature

Regards
Lene Fredborg
DocTools - Denmark
www.thedoctools.com
Document automation - add-ins, macros and templates for Microsoft Word

> You pull in the contents of an AutoText, delete that AutoText, edit what you
> pulled in, and create the AutoText with the same name.  This seems bad form
[quoted text clipped - 13 lines]
> >Fredrik E. Nilsen
> >http://fenilsen.wordpress.com
Fredrik - 06 Mar 2008 22:03 GMT
> You _can_ actually change the contents of an AutoText without inserting the
> AutoText. You do this by setting the Value property.
[quoted text clipped - 7 lines]
>         oAutoText.Value = Replace(oAutoText.Value, "abc", "12345")
>     Next oAutoText

Ah, fantastic. I found no information about this in the help file.
Thank you very much!

--
Fredrik E. Nilsen
http://fenilsen.wordpress.com

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.