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

hi,i have a pblm in qtp,im testing an webappl in which different types of error pop up messages are displayed which qtp is not differentiating or it is not recognising. how do i make it recognise different popup errorm messages while writing script?

4 Answers  


how to capture the run time values of web table.

3 Answers   CTS,


what is QTP batch testing tool?

2 Answers  


what is the diff between manual test plan document and automation test plan doc.can u explain indetail.

0 Answers   Value Labs,


How do you check ticket cost and ticket number in flight application?

0 Answers  






What is use of Global Sync Timeouts in QTP9.2?

2 Answers  


How many regression test suits in your appliction?

2 Answers   CTS,


for example one window is there, the window contains how many edit box's i want script? i know the script but that is not exact answer.... The script is like this .......... set a=description.creation() a("Native class")="WinEdit" b=window("Flight Reservation").childobject(a).count msgbox b

3 Answers  


What are SetToProperty, SetRoProperty, GetToProperty scripting?

4 Answers  


Diff b/w test scenario's and test Procedures?

0 Answers  


What are the Features & Benefits of Quick Test Pro (QTP 8.0)?

1 Answers  


Hello Everybody, please tell me how to use accessibility checkpoint and XML checkpoint by giving any practical example of it.please provide me the steps to perform that and also pls provide the code too. Thanks in advance, Gaytri

1 Answers  


Categories