Results 1 to 7 of 7
  1. #1
    3 Star Lounger rcbjr2's Avatar
    Join Date
    Jan 2001
    Location
    Matthews, NC
    Posts
    279
    Thanks
    6
    Thanked 1 Time in 1 Post

    Word 2010 Paste as Keep Text Only Adversely Affects Margins

    I have a macro that converts numbers to text. It uses fields to do the conversion and inserts those fields into my documents. However, I modified the macro so that it copies the "number words" and re-pastes them into the document as "keep text only" to avoid having fields in the document (some people didn't realize they were fields when editing the numbers/words and when I updated the fields in the doc (e.g., TOC), the number fields were incorrect). In any event, when I run the macro now, it adjusts the margins of my paragraphs. I tested this without using the macro and using the "Keep Text Only" pasting option and the "Keep Text Only" option does the same thing for any kind of text. I think this might be related to the styles I'm using. I am using Heading styles with auto-numbering. I think that maybe the numbering style is different from the Heading 2 style, for example, and when text is pasted, the margins change. Why would this be, though? Is there a way to fix this? Even if I immediately reapply the Heading 2 style, the margins don't revert to what they were. I have to make the change manually in the ruler (or otherwise). By the way, this problem occurs only with Keep Text Only. Maybe there's a setting somewhere I can change? I looked through Options & Pasting options, but couldn't find anything that seemed applicable. The macro and pasting worked fine in Word 2007. It seems to work fine in paragraphs that don't have Heading 1, 2, etc., applied. Any suggestions?? Thanks!

  2. #2
    Super Moderator
    Join Date
    Jan 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    3,852
    Thanks
    4
    Thanked 259 Times in 239 Posts
    When you paste as text only the text is formatted using the formatting of the current insertion point. For instance, if your cursor was sitting in a 'Normal' paragraph then the pasted text would be Normal.

    But I would address the real problem with your macro - why not just break the fields or lock them? This would avoid any other possible problems such as formatting issues.

    To convert selected fields into plain text you can simply press Ctrl-Shift-F9
    If you want to retain the fields but lock them so they can't change, press Ctrl-F11

    You could record these as a macro to see the code it produces.
    Last edited by Andrew Lockton; 2013-02-20 at 16:16.
    Andrew Lockton, Chrysalis Design, Melbourne Australia

  3. #3
    3 Star Lounger rcbjr2's Avatar
    Join Date
    Jan 2001
    Location
    Matthews, NC
    Posts
    279
    Thanks
    6
    Thanked 1 Time in 1 Post
    Thanks for the comments. However, let's forget that I said anything about a macro or fields. At this point, they are irrelevant to the problem. When I paste as text, the formatting of the paragraph into which I'm pasting should not be affected. The text does adopt the characteristics of the formatted paragraph. However, when I paste, the margins change! For example, when I pasted into a Heading 2 paragraph, the left margin moved in .5", thereby creating an offset from the other Heading 2 paragraphs. When I pasted into a Heading 3 paragraph, Word turned the paragraph into an hanging indent with an indent of something like 2.5". Paste as text should not affect the margins at all! I'm not sure why this is happening. It happens with or without using the macro and with any kind of text. However, the more I experiment, the more I think maybe it's this one document. It doesn't seem to happen in other documents, at least not the ones with which I've experimented. I suppose it could have become corrupted somehow. It has been edited quite a bit. I'll try re-creating it in a new, blank doc to see if the problem re-occurs. Even so, if anyone has seen this behavior and knows a fix, please let me know. Thanks.

    P.S. Based on your comments, I might revise the macro to use the method of converting the fields to plain text rather than selecting them (along with other text) and pasting them back into the document. Thx for the idea.

    -Rich

  4. #4
    3 Star Lounger rcbjr2's Avatar
    Join Date
    Jan 2001
    Location
    Matthews, NC
    Posts
    279
    Thanks
    6
    Thanked 1 Time in 1 Post
    By the way, I've done some add'l testing. I think it must just be this document. It's gotten corrupted somehow. Even if I insert it into another doc, the problem continues. However, it doesn't seem to be a problem in other docs.

    Even so, I modified my code to "unlink" the fields rather than pasting them back into the document as text only. This works even in my "corrupted" doc.

    Thanks!

  5. #5
    WS Lounge VIP
    Join Date
    Mar 2006
    Location
    Maryland, USA
    Posts
    690
    Thanks
    17
    Thanked 66 Times in 56 Posts
    You can see what the style is for your paragraph by noticing which style is highlighted (orange glow around it) in the styles gallery. If it is still heading 2 (more likely), this is what may be happening: The paragraph style's indent and the number level's position (set in the numbering dialog) may not be the same. (In the example below, they are the same (see bold).)

    Font: (Default) Arial Narrow Bold, 14 pt, Bold, All caps, Indent:
    Left: 0"
    Hanging: 0.25", Left

    Line spacing: single, Space
    Before: 12 pt
    After: 6 pt, Widow/Orphan control, Keep with next, Level 1
    Outline numbered + Level: 1 + Numbering Style: 1, 2, 3, + Start at: 1 + Alignment: Left + Aligned at: 0" + Indent at: 0.25", Style: Quick Style
    Following style: Normal

    Try making the values the same before you get rid of the autonumbers ... or modify the style afterward.

    I can't duplicate your problem, but this mismatch can cause indent changes when number values are reset, for instance.
    Pam Caswell

  6. #6
    3 Star Lounger rcbjr2's Avatar
    Join Date
    Jan 2001
    Location
    Matthews, NC
    Posts
    279
    Thanks
    6
    Thanked 1 Time in 1 Post
    Thanks for the reply. I think I discovered the problem: the direct formatting of the numbered paragraphs was not the same as the Heading 2 style. I don't know how this happened because I always use styles. I suspect that it's because the document has made several trips between my office and opposing counsel's office. Once I looked at the Reveal Formatting dialog I realized that there was a .5" indent to the left margin in the Heading 2 style (and other anomalies in other styles). So, when I pasted in the text, it forced a re-set of the paragraph to the true style settings. Once I reset the left margin in the styles, everything worked fine. So, in the end, there isn't a problem with the macro or pasting. Instead, there was a disconnect between the style settings and what I was seeing on screen which I didn't notice until I pasted text only which re-set the paragraph. Sheesh.

    By the way, there is a disconnect between the heading 2 style and the outline numbering style. I need to figure out how to edit the outline numbering styles. It was much easier in previous versions. Now I have to figure out where to edit the current outline numbering style. This document started out years ago as a template in Word 2003. I might be better off taking all my templates and re-creating the heading styles with new outline numbering styles. There is a good article about this on Shauna Kelley's website http://www.shaunakelly.com/word/numb...g20072010.html. I'm going to see what I can do. ;-)

    Thx.

  7. #7
    WS Lounge VIP
    Join Date
    Mar 2006
    Location
    Maryland, USA
    Posts
    690
    Thanks
    17
    Thanked 66 Times in 56 Posts
    Quote Originally Posted by rcbjr2 View Post
    By the way, there is a disconnect between the heading 2 style and the outline numbering style. I need to figure out how to edit the outline numbering styles. It was much easier in previous versions. Now I have to figure out where to edit the current outline numbering style. This document started out years ago as a template in Word 2003. I might be better off taking all my templates and re-creating the heading styles with new outline numbering styles. There is a good article about this on Shauna Kelley's website http://www.shaunakelly.com/word/numb...g20072010.html. I'm going to see what I can do. ;-)
    Although the autonumbering function is basically the same as it was in W2003, the programmers have made a few tweaks for the better. One of them is that, now, the number-level position settings get added to the indent settings in the paragraph style. And because number settings seem to be what you want, I'm suggesting this: right click the number of the first heading 1, in the flyout menu choose Continue numbering (or change the number value). When you again check the modify style dialogs, you should see that the number-level position settings and the paragraph indent settings match.

    If you need to change the number-level settings, click Define new multilevel list and change them there. Even if you make no changes in this dialog, OKing out of it will cause the changes to the paragraph indent settings.
    Pam Caswell

Posting Permissions

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