L
Larry
I would like to grab, from the Word clipboard, only InlineShapes,
dropping all other content. Any tips appreciated.
dropping all other content. Any tips appreciated.
Larry said:I would like to grab, from the Word clipboard, only InlineShapes,
dropping all other content. Any tips appreciated.
Larry said:It's Word 2003 on WinXP.
Here's what I'm really trying to do:
I have users who need to copy content that includes MathType equations
from a source document into a target document. The target document is
format-protected, so any local formatting (italic, colour, etc.) of
the text from the source document will be lost when it gets pasted
into the target document, and this behaviour is exactly what we want.
EXCEPT... the sophisticated vertical alignment that is applied to
MathType equations is also lost, being seen as local formatting. I
need to keep that, even at the expense of losing the text content
outright, which my users have assured me is not terribly important.
But I would still like for them to be able to select a big bunch of
content with many equations, and at least let them paste the equations
from that content in one smooth move.
Currently I do have a macro working that just quietly unprotects the
document, does the paste, then reprotects. This leaves the nice
vertical alignment of the equations... and it leaves the local
formatting of the incoming text as well. I want the one but not the
other.
Perhaps I can convince VBA that the clipboard is a range and work with
the pieces of the range that way?
Merci encore tout la mème, Jean-Guy
Larry said:Merci beaucoup, Jean-Guy ---
Your method does work; I was able to get the desired behaviour by
using a temporary document as a buffer to hold a range, clearing out
undesirable formatting there (had to add colour, spacing, etc. etc. --
I wish Word had a "go back to the absolute font basics" function). But
then I encountered other side effects, such as inadvertently altering
the font style of adjacent existing text in the target document
If you use the Normal sytle as I suggested and the two "Reset" methods, it
should take care of all that.
You mean wheh pasting the text from the dummy document back into the target
location?
This should not happen.
Make sure you use the Range object.
Try not to use the clipboard, as I suggested, this way, the user clipboard
content is not altered.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.