Screen Shot Function

  • November 2019
  • PDF

This document was uploaded by user and they confirmed that they have the permission to share it. If you are author or own the copyright of this book, please report to us by using this DMCA report form. Report DMCA


Overview

Download & View Screen Shot Function as PDF for free.

More details

  • Words: 99
  • Pages: 1
call capturescreenshot("c:\test1.xls") public function capturescreenshot(filepath) '########################################################################### ########## 'function pastes the screen shots into excel or word file along with the date and time '############################################################################# ######## if right(filepath,4) = ".doc" then set wrd = createobject("word.application") 'wrd.visible = true wrd.documents.open filepath wrd.selection.typeparagraph wrd.selection.typeparagraph wrd.selection.typetext("date: "&date&chr(10)&"time: "&time) wrd.selection.typeparagraph wrd.selection.paste wrd.activedocument.save wrd.activedocument.close wrd.application.quit set wrd = nothing elseif right(filepath,4) = ".xls" then set objexcel = createobject("excel.application") objexcel.workbooks.open filepath set objworksheet = objexcel.activeworkbook.worksheets("sheet1") objworksheet.range("a1").select for i = 1 to 55 objexcel.selection.entirerow.insert next objworksheet.cells(1,1) = "date: "&date&chr(10)&"time: "&time objworksheet.range("d1").select objworksheet.paste objexcel.activeworkbook.save objexcel.activeworkbook.close objexcel.application.quit set objworksheet = nothing set objexcel = nothing end if end function

Related Documents

Screen Shot Function
November 2019 11
Screen Shot
November 2019 19
Screen Shot
June 2020 6
Screen Shot
June 2020 4
Isa Error Screen Shot
November 2019 18