Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / November 2004

Tip: Looking for answers? Try searching our database.

Using macro to replace paragraph text but lose shape objects

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ren Stimpy - 17 Nov 2004 06:11 GMT
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.
Helmut Weber - 17 Nov 2004 12:34 GMT
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/
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.