cancel
Showing results for 
Search instead for 
Did you mean: 

Display image on outlook by calling javascript function in WDJ

Former Member
0 Kudos

HI All,

I am trying to display image on Outlook using javascript functions, by ude i can able to launch the outlook client successfully but i cant able to display image that stored in MIMES folder

thanks

Anu

Accepted Solutions (0)

Answers (1)

Answers (1)

Qualiture
Active Contributor
0 Kudos

Hi,

I have no idea what your requirements are, but you can directly access files in your mime folder via URL:

http://<fqdn>:<port>/webdynpro/resources/<pre><code>/<webdynpro_name>/Components/<package>.<YourComp>/YourImage.jpg

Or from within your Web Dynpro component via:

String fileName =WDURLGenerator.getResourcePath(wdComponentAPI.getDeployableObjectPart(), "YourImage.jpg");

Hope this explains,

Robin

Former Member
0 Kudos

HI,

I did the same to get the image from the Mimes folder, by doing this i am getting url of the image but my requirement is to display this image in outlook client using java script for this i am using following code

+ "var objNS = objO.GetNameSpace('MAPI');"

+ "var mItm = objO.CreateItem(0);"

+ "mItm.To = '"toMailAddress"'; "

+ "mItm.cc = '"+ ccEmailAddress+"'; "

+ "mItm.Subject = '"mailSubject"'; "

+ "mItm.HTMLBody = '<html><BODY>here img src = url of mimes</BODY></html>"+ htmlBody+"';"

+ "mItm.Display();

I apologize because i couldnu2019t display the code that i want to show to u thatu2019s why i just write is as above

in this case outlook is opening successfully but image is not displaying, so please suggest / help me some solution

thanks

Anu

Qualiture
Active Contributor
0 Kudos

It appears you are using Microsoft's Outlook.Mail object, I suggest you should google on how to embed an image using the Outlook API