Jump to content
Sign in to follow this  
ROH

PasteSpecial Method with Word Object

Recommended Posts

ROH

Hi,

I have a script that pastes the Clipboard content into a Word file using the Word.au3 UDF. Instead of simply pasting the standard format I would like to use the PasteSpecial method to choose the format that should be used (e.g. bitmap or enhanced metafile for copied pictures). I know this method exists with Word objects but I am nowhere near to understanding the whole thing. How should the syntax be with AutoIt? Thanks a lot for your help!

$oWordApp = _WordCreate (@ScriptDir & "\Test.doc")
$oDoc = _WordDocGetCollection($oWordApp, 0)
$oCb = _ClipBoard_GetData($CF_ENHMETAFILE)
$oDoc = _WordDocGetCollection($oWordApp, 0)
$oDoc.Range.paste ($oCb & @CRLF & @CRLF); here, paste should be replaced with pasteSpecial and enhanced metafile format

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.