Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: BruceTOGAF2 on October 25, 2017, 02:23:06 am

Title: Method LoadLinkedDocument and Windows Clipboard
Post by: BruceTOGAF2 on October 25, 2017, 02:23:06 am
I already posted 'Method LoadLinkedDocument' which shows how I paste the content of a spreadsheet cell into a Linked Document. 

This post is to enquire about Jscript getting the contents of the Windows Clipboard. 

I would like to manually highlight some text in a MS-Word document and copy (Ctrl-C) the highlighted text into the Windows Clipboard, then run a Sparx Jscript that

Can a Sparx Jscript get access to the content of the Windows Clipboard?

Title: Re: Method LoadLinkedDocument and Windows Clipboard
Post by: Geert Bellekens on October 25, 2017, 04:25:42 pm
I'm not sure about the clipboard.
Most solutions I found included an ugly workaround using Internet Explorer (of all things)

But have you tried getting the contents from the Word API directly?
That way you wouldn't have to hijack the clipboard. I hate it when applications put something on the clipboard and overwrite whatever I had copied.

Geert
Title: Re: Method LoadLinkedDocument and Windows Clipboard
Post by: BruceTOGAF2 on October 31, 2017, 07:40:57 pm
I do not know about Word API.  I typed 'Word API' into the Sparx Enterprise Architect User Guide and got zero search results.  Please can you pint to me a useful resource about Word API.
Title: Re: Method LoadLinkedDocument and Windows Clipboard
Post by: qwerty on October 31, 2017, 10:18:33 pm
Google is your friend here, not Sparx' search engine. http://lmgtfy.com/?q=microsoft+word+api (http://lmgtfy.com/?q=microsoft+word+api)

q.