strange problem with Inlineshapes

gul791
08-06-2004, 08:20 AM
Hi all

I have a very strange problem with InlineShapes. In my document if there is a canvas before any wordart inlineshape, and i try to get a reference of this shape it give me a error. My objective is to change the text of all wordart shapes.

I am using ms word2003 and vb.net for automation

here is my code

Dim wapp As Word.Application
Dim wdoc As Word.Document

wdocs.InlineShapes.Count
wdocs.InlineShapes(1).TextEffect.text = "ABC"

if in my document i have a drawing canvas before wordart i got error on last line, i do not why? And even more strange thing is if I have also another canvas after the wordart the code wdocs.InlineShapes.Count return me zero. Please help me, I need to resolve it very urgently.

Thanks and regards
Atif

Wamphyri
08-06-2004, 11:29 AM
First thought, did you try doing a Shapes count instead of an InlineShape count?

gul791
08-10-2004, 09:49 AM
First thought, did you try doing a Shapes count instead of an InlineShape count?

yes I tried it but i did not work. The interesting thing is, if i have a canvas and a word art in my document, both are inline, wdocs.InlineShapes.Count returns me one. But when i use wdocs.InlineShapes(1).TextEffect.text = "ABC" , it give me error.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum