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

How we can we create a Text checkpoint in QTP 9.1,Actually what i did is first i put in recording mode and gofor Inser menu>Checkpoint>Textcheckpoint>click,Now an hand symbol came and i showed it to some textbox and cliked but the QTP9.1 is giving an error message like "The Obkect you are selecting doesn't support this operation" If i go for Help of QTP 9.1 information I didn't get any solution,pls help me in this issue.

6 Answers  


in qtp if we record a object and we record the object using virtual wizard then by which way the object is recognized that means recorded

0 Answers  


How to create a standard checkpoint ?

0 Answers  


3. How to handle the exceptions using recovery secnario manager in Qtp?

2 Answers   Wipro,


Inserting a Call to Action is not importing all columns in Datatable of globalsheet. Why?

1 Answers   Crea,






Can abody explain me Send keys concept

1 Answers   Cap Gemini,


how to find that tools work well with your existing system?

0 Answers  


It is a SQL question. Write a query to find top three salaries in an EMP TABLE?

7 Answers  


How to parameterize Object Repository?

2 Answers  


We have 10 page.In first page we 2 popup and next page we 3 popup window......(windows name is different)how can we handle the all the popups without using recovery scenario

1 Answers   HK, TCS,


How do you open adobe acrobat file in QTP and do some testing on that file ?

0 Answers  


How to parameterize a text field and the same field as combo field on next page. Means inserting values in Text field will appear in the combo field. for example country name, state name. Kindly reply it is urgent !!!

1 Answers   Adobe,


Categories