Insert picture into Stencil

J

jpabich

I need help importing a picture to a stencil. I have the following
code:

Visio.Shape visShape;
visShape = VisPage.Drop( visMaster, 1, 1);

I want to use the InsertFromFile or InsertObject functions to insert a
jpg into the stencil, but I get errors when trying to do this. How can
I insert a picture into the stencil?
 
J

JuneTheSecond

It might be,,,
Visio.Shape visShape;
Visio.Master visMaster;
visShape = visPage.Import("FullPathFileName");
visMaster = visStencil.Drop(visShape , 0#, 0#);
visShape.Delete;
 
J

jpabich

I trie this but got a COMException stating that Visio is unable to
complete importing. I get errors when I try insertfromfile as well.
 
J

JuneTheSecond

How did you defined visPage?
VisPage should be existing, for example , ActivePage or Pages(1) of active
drawing or stencil in the editing mode.
 
J

JuneTheSecond

Is the stencil opeded in editing mode? If not, close it once and open
asdocked and read write mode using OpenEx method.
 

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