DJ143 Posted July 22, 2015 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.
MikahS Posted July 22, 2015 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
DJ143 Posted July 23, 2015 Author 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?
water Posted July 24, 2015 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 2024-07-28 - Version 1.6.3.0) - Download - General Help & Support - Example Scripts - Wiki ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki Task Scheduler (2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs: Excel - Example Scripts - Wiki Word - Wiki Tutorials: ADO - Wiki WebDriver - Wiki
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