Sign in to follow this  
Followers 0
ROH

PasteSpecial Method with Word Object

1 post in this topic

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  
Followers 0