• AutoText Not Keeping Formatting

    Author
    Topic
    #356807

    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

    Viewing 2 reply threads
    Author
    Replies
    • #528731

      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.

    • #528873

      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?

      • #529226

        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…

        • #529272

          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.

          • #529321

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

    • #529357

      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 this thread.

      • #539202

        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? bummer

        • #539269

          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.

        • #539295

          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(“Autotextname”).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.

          • #539430

            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.

    Viewing 2 reply threads
    Reply To: AutoText Not Keeping Formatting

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: