Reply
 
Thread Tools Display Modes
  #1   Report Post  
Evgeniy
 
Posts: n/a
Default 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   Report Post  
Shauna Kelly
 
Posts: n/a
Default

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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
creating forms Fluffypink Microsoft Word Help 4 March 9th 05 04:17 PM
AutoCaptions & Pictures in Word 2003 DKP Page Layout 2 February 17th 05 11:55 PM
word doesn't print text and graphics Delboy New Users 1 January 27th 05 02:20 PM
Working with text and graphics in a large document Marcia Mayne Microsoft Word Help 1 December 31st 04 03:34 AM
textbox to normal text Jack Sons New Users 16 December 5th 04 03:44 PM


All times are GMT +1. The time now is 12:06 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"