How do I programatically pass clipboard contents to a field in a Chrome webpage?
I have a block of plain text within a MS Word field that I want added to my system clipboard and then passed to a webpage in Chrome by clicking a command button named "Send to Chrome".
How would I accomplish this in VBA inside of MS Word?
Essentially, I want the computer to:
Select all the contents in a field in a MS Word document named "DraftingField" and add the field's contents to the system clipboard, then
Go to Chrome, if open, and look at the open tabs until its find "XYZ" in a tab's title, if present, indicating that a particular Chrome tab is open to the correct url/webpage, then
Look for a field named "Destination" on that webpage, position the insertion point in that field, and paste the clipboard contents into the field.
If Chrome is not open or the target "XYZ" webpage is not open, then I want Word to throw an error in a message box that says, "Please open Page XYZ in Chrome."
Any help would be much appreciated!
|