Results 1 to 13 of 13
  1. #1
    Star Lounger
    Join Date
    Apr 2001
    Location
    new york city
    Posts
    98
    Thanks
    0
    Thanked 0 Times in 0 Posts

    AutoText Not Keeping Formatting

    A user here is trying to use AutoText for some tables that she has to enter on various order forms. Unfortunately, the formatting of the tables is not sticking when she saves them in the AutoText list.

    Any suggestions of what might be going wrong? Word 98 on NT 4.0...Thanks

  2. #2
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts

    Re: AutoText Not Keeping Formatting

    Is she creating autotexts composed of entire paragraphs (including the paragraph mark at the end of the selection). If not then the text is inserted into whatever style is currently selected.

    The other possibility if the autotext is being added manually is that you mentioned it is for use in a form. Are form fields being used? You can't format protected fields.

    If the autotext is being added via a macro you need to make sure that there is a 'RichText:= True' added in there.
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  3. #3
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,049
    Thanks
    124
    Thanked 119 Times in 116 Posts

    Re: AutoText Not Keeping Formatting

    Hi Meridith,

    Is she saving text as AutoText that goes into tables?

    Table Rows as AutoText? (Don't know if this can be done)

    The netire table as an AutoText entry?

    Is she using styles for her formatting?

    Is the formatting of the text changing?

    The size/border/breaking formats of a table?
    Charles Kyle Kenyon
    Madison, Wisconsin

  4. #4
    Star Lounger
    Join Date
    Apr 2001
    Location
    new york city
    Posts
    98
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: AutoText Not Keeping Formatting

    The user created a table in Word and has text in some of the cells. The entire table has been saved. She has not used styles.

    She has been able to save both the table and the text correctly. It is the formatting that is changing on her. When she saves the table with text to AutoText, the formatting changes. When she inserts the AutoText entry it isn't how she wants it.

    Is there anything to do about this?

    Thanks...Hope that is a little clearer and answers some questions...

  5. #5
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts

    Re: AutoText Not Keeping Formatting

    I think the problem is that she hasn't used styles. If each paragraph in the autotext was using a style with no local formatting then it would work properly. This is because some local formatting doesn't make the trip into and then back out of the Autotext. I think the character formatting survives but the paragraph formatting drops off. If styles were used this would not be the case.

    The fix is therefore to set the autotext up with proper definitions. If in doubt, select the text and do a Ctrl-Q and Ctrl-Space before you create the autotext. If it changes then you haven't used the styles exclusively to provide the formatting.

    New style names are cheap, I've no idea how many you can have in the document so feel free to make new ones for each para.
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  6. #6
    Star Lounger
    Join Date
    Apr 2001
    Location
    new york city
    Posts
    98
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: AutoText Not Keeping Formatting

    Thank you for the suggestion, Andrew. I will try using styles and see if that helps keep the formatting.

  7. #7
    BAM
    Guest

    Re: AutoText Not Keeping Formatting

    <<New style names are cheap, I've no idea how many you can have in the document so feel free to make new ones for each para>>

    Keep the number under 10,000 and you should be safe! <img src=/S/grin.gif border=0 alt=grin width=15 height=15>
    ~~~~~~~~~~~~~~
    Cheers!

  8. #8
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,049
    Thanks
    124
    Thanked 119 Times in 116 Posts

    Re: AutoText Not Keeping Formatting

    Are we talking formatting of the text in the table or formatting of the table itself? If the entire table is the AutoText entry this shouldn't be a problem.

    If we are talking about table formatting, you may want to look at my response in <A target="_blank" HREF=http://www.wopr.com/cgi-bin/w3t/showflat.pl?Cat=&Board=wrd&Number=45390&page=0&vie w=collapsed&sb=5> this thread</A>.
    Charles Kyle Kenyon
    Madison, Wisconsin

  9. #9
    Star Lounger
    Join Date
    Jan 2001
    Location
    Upstate NY, New York, USA
    Posts
    78
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: AutoText Not Keeping Formatting

    In searching for a resolution to this same problem, I ran across this thread. I am inserting autotext entries via a VBA routine in Word. The paragraphs contain the appropriate styles and numbering (Heading 1, Heading 2), and when I defined the autotext entries, I was sure to include the paragraph marker. However, when the document assembles at the end of the routine, the entire document is body text style. Any suggestions from the experts? <img src=/S/bummer.gif border=0 alt=bummer width=15 height=15>

  10. #10
    2 Star Lounger
    Join Date
    Feb 2001
    Location
    Oklahoma, Oklahoma, USA
    Posts
    134
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: AutoText Not Keeping Formatting

    One thing to remember is what I term the "mother style rule" - the formatting of the receiving document dictates how the style performs if an existing style has the same name - accordingly, even if styles are added to the table, the expected formatting could get lost when dropped into another document that doesn't have the styles formatted as they were when the AutoText entry was created. Therefore, the suggestion of creating style names is a good one since it would insure the formatting came with the AutoText entry into any receiving document. I have suggested in my environment that a style be applied to each column of a table and that the style name be prefixed with "tbl_" and then description of the column, i.e. tbl_date, tbl_description, tbl_tabnumber, etc. This flags those styles uniquely for use in tables, groups them nicely in the Styles list and lets you know not to use those styles else where in the document and risk having them reformatted.

  11. #11
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts

    Re: AutoText Not Keeping Formatting

    Joanne

    When using VBA to insert the autotext you have to include a switch called RichText. Unfortunately this is a gotcha that is very common when recording a macro to see the code. If you VBA looks similar to this then the result should be different.

    ActiveDocument.AttachedTemplate.AutoTextEntries("A utotextname").Insert Where:=Selection.Range, RichText:=True

    If you do a search back through this forum on 'RichText' you will most likely find other examples of this.
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  12. #12
    Star Lounger
    Join Date
    Jan 2001
    Location
    Upstate NY, New York, USA
    Posts
    78
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: AutoText Not Keeping Formatting

    Thank you Andrew... I wasn't even aware of a RichText feature...so I was searching under AutoText. This does seem to have worked for me. Thanks for your assistance.

  13. #13
    Star Lounger
    Join Date
    Jan 2001
    Location
    Upstate NY, New York, USA
    Posts
    78
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: AutoText Not Keeping Formatting

    Thank you Ms. Witch. I shall try that in my next project <img src=/S/cauldron.gif border=0 alt=cauldron width=20 height=20>

Posting Permissions

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