Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 09-12-2012, 11:30 PM
kyjac85 kyjac85 is offline A macro that can insert FILENAME, sendkeys CTRL ALT T, paste clipboard, and nextline Windows 7 64bit A macro that can insert FILENAME, sendkeys CTRL ALT T, paste clipboard, and nextline Office 2010 64bit
Novice
A macro that can insert FILENAME, sendkeys CTRL ALT T, paste clipboard, and nextline
 
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
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
A macro that can insert FILENAME, sendkeys CTRL ALT T, paste clipboard, and nextline paste and insert, not replace userman Excel 4 06-06-2012 05:15 AM
Problem with the sendkeys in Win7 vidyapakki Excel Programming 1 05-07-2012 11:10 PM
A macro that can insert FILENAME, sendkeys CTRL ALT T, paste clipboard, and nextline Insert/Paste Picture into Protected Worksheet udea Excel 1 02-06-2012 07:43 PM
A macro that can insert FILENAME, sendkeys CTRL ALT T, paste clipboard, and nextline How to insert current date into default filename ? czomberzdaniela Word 1 12-27-2011 07:18 PM
Macro for automatically adding filename without .doc RPM7 Word VBA 0 04-29-2010 01:43 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:35 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft