Using macro to replace paragraph text but lose shape objects

R

Ren Stimpy

Hi,
I am having trouble replacing text without losing the shape objects
in a paragraph. What I did was looping through all the paragraphs; for
each paragraph I get the range and then I replace the text in the
range. The problem is if there are shapes (either pictures or
textboxes) in the paragraph they disappear after I replace the text in
the paragraph's range. Can anyone suggest what I can do. Thanks very
much for your help.
 
H

Helmut Weber

Hi Ren,
you could check, whether the paragraph contains inlineshapes.
But from that on, it may get a bit complicated.
You would have to find the position of the inlineshapes and to
decide, what text comes before it and what text comes after it,
or between one inlineshape and the next one. Feasable, though,
but not something I'd like to code.
---
Greetings from Bavaria, Germany
Helmut Weber, MVP
"red.sys" & chr(64) & "t-online.de"
Word XP, Win 98
http://word.mvps.org/
 

Ask a Question

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.

Ask a Question

Top