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

Does QTP supports Linux or Unix OS?.If so which scripting is preferable? Shell we do record and playback

1 Answers  


What the genaric function to connect Sql Server using Sql Server Authentication and Windows Authentication

1 Answers  


which tpye of exceptions mostly do we face in QTP

2 Answers  


How to check the URL using Automation tool QTP

2 Answers  


object types is used for what?

1 Answers  






How did you resolve conflicts present in Object Repository?

0 Answers  


Hi, I want to retrieve the cell data in the WebTable. For that I have defined a new test object under the browser and have given html tag and text as the test object properties. But while I try to identify it it says 'Object description is not unique'. I tried adding innerhtml, outerhtml, innertext and outertext along with the ordinal identifiers; but no use. What more properties need to be added to identify it? Also I want to enable smart identification for this object but the field is disabled in the object repository for this object alone(In QTP tools->object identification the enable smart identification checkbox is enabled). How do I enable it?

3 Answers  


what is the purpose of .vbs file?

2 Answers   HCL,


any body want to learn qtp with real time concept on Banking domain contact ciraaj@gmail.com

1 Answers  


What is Reusable component is QTP...Anybody can answer it..Thanks in advance...

8 Answers   Siemens,


in a web page How to check and display a particular word from a paragraph?

0 Answers  


When Recovery scenario actually starts while testing the application?

0 Answers   SAP Labs,






Categories