Loading ...
Sorry, an error occurred while loading the content.
 

Re: [Clip] Help with Keyboard Macro

Expand Messages
  • Larry Thomas
    Hi Jeff, ... I think that I know how this works now. It looks like you are going in one row from cell to cell and copying each cell and then switching to Word
    Message 1 of 4 , Jan 17, 2004
      Hi Jeff,

      At 08:45 PM 1/17/04 -0000, you wrote:
      >Hello,
      >I've written a keyboard macro in NT Light to copy/paste several
      >thousand rows of text from Excel into another application (I'm using
      >Word for testing). I basically created a loop to go to the next row
      >of the spreadsheet. It works well, but I cannot figure out how to
      >actually end it when it gets to the last row of the spreadsheet. I
      >just need something in there that says if no more data - END. Here is
      >clip:
      >
      >:Start
      >;Last Name
      >^!FocusApp Microsoft Excel - Import Test - Prod
      >:Start
      >^!Keyboard CTRL+C
      >^!FocusApp test script - Microsoft Word
      >^!Keyboard CTRL+V
      >^!Keyboard TAB
      >^!Keyboard TAB

      I think that I know how this works now. It looks like you are going in one
      row from cell to cell and copying each cell and then switching to Word and
      pasting to it. I suggest that you do the first part of the clip like this.

      :Start
      ;Last Name
      ^!FocusApp Microsoft Excel - Import Test - Prod
      :Start
      ^!Keyboard CTRL+C
      ^!FocusApp test script - Microsoft Word
      ^!IfSame "^$GetClipboard$" "^%nl%" Exit
      ^!Keyboard CTRL+V
      ^!Keyboard TAB
      ^!Keyboard TAB

      The statement:

      ^!IfSame "^$GetClipboard$" "^%nl%" Exit

      Will cause the clip to quit if there is nothing in the clipboard except a
      <cr/lf> carriage return pair. Otherwise the clip will keep looping until
      that happens which it will if the clip tries to copy from an empty cell in
      NoteTab.

      Regards,

      Larry
      lrt@... e¿ê
    Your message has been successfully submitted and would be delivered to recipients shortly.