Results 1 to 2 of 2
2004-12-04, 23:31 #1
- Join Date
- May 2003
- Los Angeles, California, USA
- Thanked 2 Times in 2 Posts
.FormattedText vs. copy/paste (Word 2002 SP-2)
I've just stumbled onto the .FormattedText property, which allows you to copy and paste formatted text (including paragraph formatting) by assigning it to a range object rather than by passing it through the clipboard.
I can see an advantage to this in a case where I want to "store" several pieces of formatted text before pasting any of them. But in the more ordinary case, where you're just copying one piece of formatted text and then pasting it, is using the .FormattedText property considered "best practice" (like using ranges is generally better than using Selection) or is this more a case of six of one, half-a-dozen of the other?
2004-12-07, 20:20 #2
- Join Date
- May 2001
- Stuttgart, Baden-W, Germany
- Thanked 0 Times in 0 Posts
Re: .FormattedText vs. copy/paste (Word 2002 SP-2)
The latter, probably.
The main advantage I see in using .FormattedText is that your macro doesn't mess with the clipboard content (which might be annoying).
OTOH Copy/Paste seems easier to program and debug (to me).
Speed might be a consideration, but it's hard to think of a sensible macro that does enough copy/paste operations for that to be important.
<img src=/S/cheers.gif border=0 alt=cheers width=30 height=16> Klaus