objSlide.Master.Shapes.AddPicture(strPicPath, MsoTriState.msoTrue,
MsoTriState.msoFalse, 398, 43, 309, 200);
My requirement is to display the image on the Slide from a given .jpg file.
And I am able to do this by using the Shapes.AddPicture and providing the
path of .jpg file.
The problem comes when .jpg file is not accessible, this means when I use
the path of a local jpg file it works fine, and when I use the remote path
for jpg file (a different file server) then it does not work because my C#
code can not access the jpg file located at file server (because application
server does not have access permission to jpg file on file server). But the
actual end users of application do have the access to the jpg image file.
That is why I am looking if there is a way to just give the path of jpg file
in my server side coding and it can be rendered (displayed) on the PPT at
client side. I can not create the image at server side as my Application
server can not access the jpg file.
Is there any way to just create a blank image in PPT with a link to a .jpg
file so that when that PPT is opened at client machine, image is displayed
using the .jpg file from the file server? My scenario is something like using
href in html with a remote image path, but I do not know how to do this in
PPT using C#.
Thank you very much for any help.
--
HridayNarayan Rai
MCAD.
Obviously PowerPoint won't allow you to insert an image that it doesn't have
access to.
But it also won't let you create a link to an image that's not where the link
points, so your code wouldn't be able to link to the image unless you have acces
to the image.
One possible workaround: map a drive letter to a folder you DO have access to,
put a "dummy" image there and link to it. The link now points to e.g.
"X:\photos\your_image.jpg". Create the same drive map at the user end and make
sure the image is there as well. The link should then work.
That assumes that you have some degree of control over the machines at the other
end, of course.
==============================
PPT Frequently Asked Questions
http://www.pptfaq.com/
PPTools add-ins for PowerPoint
http://www.pptools.com/