Showing posts with label TCS Testing Interview Questions. Show all posts
Showing posts with label TCS Testing Interview Questions. Show all posts

Wednesday, September 5, 2012

How to capture your applications screenshot to a Word document

'This method capture the desktop Screen capture.
Desktop.CaptureBitmap "C:\TempSS.png",true

'If you want to capture your application, then use syntax like B().CaptureBitmap

Set objWord=createobject("Word.Application")
objWord.Documents.Open("C:\Test.doc")
objWord.Application.Selection.InlineShapes.AddPicture("C:\TempSS.png")
objWord.ActiveDocument.Save
'objWord.ActiveDocument.SaveAs("1.doc")
objWord.ActiveDocument.Close
Set objWord=nothing