Lin_Lam
(Lin Lam)
January 14, 2023, 10:09pm
1
Hi everyone,
I’m trying to insert a few screenshots using send outlook activity, I am using the Create HTML Content activity to format the HTML for the email body, the locations of the images are variables.
I tried in the Edit HTML Content activity - insert image - From file when run, it is giving me error as “Error: System.Exception: Object reference not set to an instance of an object”.
This variable is not Null, I tried String type variable which is the location of the image, also I tried a image type variable, none of them work.
Image type variable:
String type variable:
Variables:
Load image tp create Image type variable:
Thanks!
Hi @Lin_Lam
Did you tried creating a variable and then assign value to that variable.
Thanks
Lin_Lam
(Lin Lam)
January 15, 2023, 3:26am
3
@ Rahul_Unnikrishnan
Yes, I did, please see the following screenshot:
Can you please share your xaml file if you don’t see such error message?
Thanks!
Anil_G
(Anil Gorthi)
January 15, 2023, 3:42am
4
@Lin_Lam
Did you try adding it as a data value?
And alternately
Click on </>
and then try inserting the code for image withh below method
@tomaz
Attach the image as an attachment say the image is text.png
then in body use <img src="text.png">
If writing directly in the body field as string then
"<img src=""text.png"">"
cheers
Cheers
Lin_Lam
(Lin Lam)
January 15, 2023, 4:10am
5
@Anil_G Do you mean by this?
I can’t leave it as hard coded - “text.png” since the location of the image is a variable.
I am not able to add variable in the HTML editor, can you please send me an example XAML?
Thanks!
Anil_G
(Anil Gorthi)
January 15, 2023, 4:53am
6
@Lin_Lam
Try modifying like this
Cheers<IMG src=" & variablename & "/>
Cheers
Lin_Lam
(Lin Lam)
January 15, 2023, 1:35pm
7
Anil_G:
<IMG src=
It doesn’t work, the email is still showing “no image error”
Here is what I configured, I tried two different tags, none of them worked:
Anil_G
(Anil Gorthi)
January 15, 2023, 5:59pm
8
@Lin_Lam
Did you attach the email as well?
You have to attach and then give in the img tag
Cheers
Lin_Lam
(Lin Lam)
January 15, 2023, 7:32pm
9
I just tried, didn’t work.
Would you mind sending me an example XAML? I’m really struggling here…
Thanks a lot.