View Single Post
 
Old 09-12-2012, 11:30 PM
kyjac85 kyjac85 is offline Windows 7 64bit Office 2010 64bit
Novice
 
Join Date: Sep 2012
Posts: 10
kyjac85 is on a distinguished road
Post A macro that can insert FILENAME, sendkeys CTRL ALT T, paste clipboard, and nextline

I'm new to this macro programming and could use a few pointers.

The first part of this macro I would like it to insert the file name of the current document without the file type extension as well as the last three characters of the filename. For example: "myworddoc_XX.doc" = "myworddoc" ... deleting the last three characters and filetype is not a necessity, but it would be nice.

The second part of the macro would simulate keystrokes using sendkeys I believe. I have another program that dumps text to the clip board when you press CTRL + ALT + T, so I just need it to simulate me pressing and holding CTRL + ALT, and then just pressing the letter T. Afterwards, I need to paste the clipboard directly behind the "myworddoc" and then press ALT ENTER to put the cursor on the line directly below.

Reading around I can't figure out how to get sendkeys to work properly. I get the impression that it isn't a very reliable command to use as well.


Also, Is it possible to bind hotkeys to anything other than the keyboard or MS buttons? I have a transcription foot pedal that would be awesome if I could bind the hotkey to it, but my google searches left me hopeless.
Reply With Quote