How to insert screenshot on to the body of outlook?
-1 how to use insert-picture tab in new email outlook to
insert image in the body.
Suggest something.......



How to insert screenshot on to the body of outlook? -1 how to use insert-picture tab in new email o..

Answer / sanjay kardile

Hello,

You can try the below code. Hope this is help full.


Set objOutlookMail = CreateObject("Outlook.Application")
Set myMail = objOutlookMail.CreateItem(0)
myMail.Display
Set myMailProperty = objOutlookMail.ActiveInspector

If myMailProperty.IsWordMail = "True" Then
Set myDoc = myMailProperty.WordEditor
' Insert text and Image in the body of the email
myDoc.Range.InsertBefore Chr(13) + "First line of the text at the bottom of the Image" + Chr(13) + " Second of the text at the bottom of the image"
myDoc.InlineShapes.AddPicture "C:\PrintScreen.png"
myDoc.Range.InsertBefore "First line of the text at the top of the Image" + chr(13) + "Second line of the text at the top of the Image" + Chr(13)

myMail.To = "someone@someone.com"
myMail.Subject = "This Mail is from QTP. "
myMail.Send
End If

Set myMail = Nothing
Set objOutlookMail = Nothing
Set myDoc = Nothing

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

What is meant by Output Value in UFT?

0 Answers  


can we call a test in another test? how? explain with one example?

1 Answers   iFocus,


describe some problem that u had with automation testing tool?

3 Answers  


Can anyone pls tell me in realtime (descriptive programming) how will the properties of the object be given to the test team. R they given in an excel sheet and is the same sheet also given to the development team and by whom is this given? Thanks a lot.

0 Answers  


What is the scripting language used in QTP?

11 Answers   IBM,






how to get column count in datatable

3 Answers  


how to evalute defects in QTP script?

0 Answers  


If an application name is changing frequently i.e while recording it has name “Window1” and then while running its “Windows2” in this case how does QTP handle?

7 Answers   Covansys,


Tell me the difference between QTP9.2, QTP9.5 and QTP10.0

1 Answers   Genpact, HSBC,


How do we call Library Files(.vbs) in the Test Script Thanks in Advance...

6 Answers  


How to retrieve the property of an object in QTP?

5 Answers  


we have 10 automation scripts. how to call them from one main script.

2 Answers  


Categories