Home |
Search |
Today's Posts |
#1
|
|||
|
|||
text and graphics processing. (Word & C#)
I've go problem!
I want my word plug-in to cut all pictures from the document, and then paste them back. for (i = 1; i = applicationObject.ActiveDocument.Paragraphs.Count; i++) { ???? } what shall I do? thanks |
#2
|
|||
|
|||
Hi Evgeniy
There are two collections in Word that control pictures. To understand why, see: The draw layer: a metaphysical space http://www.word.mvps.org/FAQs/DrwGrphcs/DrawLayer.htm First, there is a Shape object. All Floating objects and inline AutoShapes are of type Shape. The collections that govern them are the ShapeRange and Shapes collection. If myDoc is a document, and myRange is a range, then In VBA terms: Dim myShape as Shape Set myShape = myDoc.Shapes(1) Set myShape = myRange.ShapeRange(1) There is also an InLineShape object. All Inline objects *except* inline AutoShapes are of type InLineShape. And they are found in the InLineShapes collection. So in VBA terms: Dim myILS as InLineShape Set myILS = myDoc.InLineShapes(1) Set myILS = myRange.InlineShapes(1) So you'll need to cycle through both Shapes and InLineShapes collections. Word's VBA help has more info on these. Hope this helps. Shauna Kelly. Microsoft MVP. http://www.shaunakelly.com/word "Evgeniy" wrote in message ... I've go problem! I want my word plug-in to cut all pictures from the document, and then paste them back. for (i = 1; i = applicationObject.ActiveDocument.Paragraphs.Count; i++) { ???? } what shall I do? thanks |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
creating forms | Microsoft Word Help | |||
AutoCaptions & Pictures in Word 2003 | Page Layout | |||
word doesn't print text and graphics | New Users | |||
Working with text and graphics in a large document | Microsoft Word Help | |||
textbox to normal text | New Users |