DJ143 Posted July 22, 2015 Share Posted July 22, 2015 hi all,I have an issue for saving screenshots. using _ScreenCapture_Capture() I can save a snapshot in a particular location. But is there a way to move that snapshot into a word doc and other snapshots in same document. So that this would be easier for me to consolidate the screesnshots for a particular scenario. Link to comment Share on other sites More sharing options...
MikahS Posted July 22, 2015 Share Posted July 22, 2015 Have a look at the _Word_*** functions, including _Word_DocPictureAdd. Snips & Scripts My Snips: graphCPUTemp ~ getENVvarsMy Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4 Feel free to use any of my code for your own use. Forum FAQ Link to comment Share on other sites More sharing options...
DJ143 Posted July 23, 2015 Author Share Posted July 23, 2015 hi,thanks for your suggestion. following is the code:#include <ScreenCapture.au3>#include <Word.au3> _ScreenCapture_Capture(@ScriptDir & "\image.png")Local $oWord = _Word_Create()Local $oDoc = _Word_DocOpen($oWord, @ScriptDir & "\Test.doc", Default, Default, False)Local $oRange = _Word_DocRangeSet($word, -2)_Word_DocPictureAdd($word, @ScriptDir & "\image.png", Default, Default, $oRange) This open the word doc every time while taking the screenshot. Is there anyway of keeping the word doc in hidden and taking the screenshot? Link to comment Share on other sites More sharing options...
water Posted July 24, 2015 Share Posted July 24, 2015 Use _Word_DocAttach to connect to the already open document. If this fails then the document hastn't been opened yet and you need to call _Word_DocOpen. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now