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

Can u tell me example for virtual objects?

2 Answers   Value Labs,


how many scripts r there in QTP? pls any answer this question?

4 Answers  


In our application (Web based application)we will get a pdf file and we have check a particular text in that pdf. Can any one tell how to check text in a pdf file. In the same pdf file it generating some links and I have to click that links. QTP unable recognizing that links, even id did record and playback qtp does not generating any script. Can any one help me….?

6 Answers  


i have data in excel sheet.i imported the data in data table.while doing parameterization,how the code knows it is a valid or invalid data?

2 Answers   Fiserv,


An object is created, i dont know the methods available for that object, i want to find methods available for that object and use the required method. How i can do this???

4 Answers   HCL,






Could any one explain about the nested actions in QTP? This question is asked by Qualitree and CA

3 Answers   CA, Qualtree Solutions,


Hi frnds, for ex.. we got a job in wipro, they will give me one mail id.. "Rameshkumar@wipro.com", where to open this mail id..in which sw ? or outlook?

1 Answers  


How to test menu options using qtp

2 Answers  


Can i run the qtp, without OBJECT REPOSTIRY...

8 Answers  


How do u write a regular expression for date (dd/mm/yyyy) field?

10 Answers  


Is there any MS Access addin in QTP?

7 Answers  


How do u do batch testing in WR & is it possible to do in QTP, if so explain?

2 Answers  






Categories