insert image in page

J

jess

Hi,

How do I insert an image on a page? I need to insert it as a layer.
What I have is the file location of the image but now i need to insert it on
page via code........
 
C

Chris [Visio MVP]

Check out: visio.Activepage.InsertFromFile.

It returns a Visio.Shape object, but there's some flags to set. See the
Visio developer's help for info on the flags.

Once you've got the image-as-a-shape, you can assign it to a layer.

Something like:

Visio.ActivePage.Layers("TheLayer").Add( shp, true)

Again, check the help for info on the 2nd argument in Layers.Add( , )
 
A

Al Edlund

try something like

Set PicShape = AShape.Import(FilePath)

the v2003 sdk has examples of working with layers.

al
 

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