Programmatically insert a picture??

T

TKO

Hello everyone...here's my dilemma...

I have a drop-down list dynamically created from a SharePoint list of
different picture filenames. The value of each of the item is the
exact URL path to each picture. When the user selects a picture name
from the list, how do I get Infopath to automatically suck that
picture from the URL into a picture item.

I'm only able to get it to work if I set the picture as a link only,
but I want the picture to be part of the form so that it can be viewed
offline as well. So is there a way, programmatically, to get InfoPath
to suck in a pic from the selected URL and store it as part of the
form, not as a link to the pic?

Thanks everyone!

Regards,
Tony
(e-mail address removed)
 
A

Andrew Ma [MSFT]

If you want the picture to be part of the form, you need to base64 encode
it, then stick it in like any other value.

http://blogs.msdn.com/infopath/archive/2004/04/21/117600.aspx
This link has a snipet on how to base64 encode images using C#.

--
Andrew J. Ma
Software Test Engineer
Microsoft Office InfoPath
http://blogs.msdn.com/ajma
---------------------------------------
This posting is provided "As Is" with no warranties, and confers no rights.
Use of any included script sample are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.
Please do not send email directly to this alias. This alias is for
newsgroup purposes only.
 

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