Cannot add picture using Shapes.AddPicture method

Joined
Apr 26, 2010
Messages
1
Reaction score
0
Hi folks,

I'm trying to add a picture to my slide but without success unfortunately.

I'm using AddPicture method of Shapes and what ever i'm trying to do, I get the following error:
Description: "The specified file wasn't found."
Number: -2147024809

The following is my code:
Code:
function AddPicture(fileName,Left , Top , Width , Height)
{
try
{
LastError = '';
var objPicture = objSlide.Shapes.AddPicture("c:\pictures\yair.bmp", msoFalse, msoCTrue,Left,Top,Width,Height);
}
catch(e) 
{
LastError = e;
}
return LastError == '';
}

Anyone can help me please?

Thank you!

Yair
 

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