Copy URL and Paste in Clipboard or File

Hi There.

I'm looking for an automation how to Copy several URLs from my Excel workbook to a file or a Clipboard.

I can't find the correct function for that?

Can anyone help really quick?

Thank you!

Copy several URLs from my Excel list (Excellist ?)

But not in the sense of selecting the relevant cells in Excel and using ⌘C ?

1 Like

Yes in that sense :smiley:

So perhaps you don't need a macro ?

( Copying to clipboard seems to work fine anyway ...)

What is failing for you?

Please post the simplest possible macro that demonstrates the problem, so we can test.

Note – Microsoft Excel uses a private clipboard, and it may be necessary to:

  • Copy.
  • Activate a different app to force the private Excel clipboard public.
  • Process with Keyboard Maestro.

I usually use AppleScript to get the selection in order to avoid that problem.

Something like this:

--------------------------------------------------------
# Auth: Christopher Stone
# dCre: 2019/09/01 17:46
# dMod: 2023/05/18 13:54
# Appl: Microsoft Excel, Keyboard Maestro Engine
# Task: Extract Value of Selected Cells to a KM Variable
# Libs: None
# Osax: None
# Tags: @Applescript, @Script, @Keyboard_Maestro_Engine, @Excel, @Microsoft_Excel, @Extract, @Value, @Selected, @Cells
--------------------------------------------------------

tell application "Microsoft Excel"
   set cellValueList to value of cells of selection
end tell

set AppleScript's text item delimiters to linefeed
set cellValueList to cellValueList as text

set kmInstance to system attribute "KMINSTANCE"
tell application "Keyboard Maestro Engine"
   setvariable "cellValueList" to cellValueList
end tell

--------------------------------------------------------
1 Like