keyboard macro

For help regarding the message board and any other computer related matters you may have!

keyboard macro

Postby Bobbie En Tejas » Fri Apr 14, 2006 7:05 am

I have windows XP and work in Word. I edit a couple hundred files every day. After I edit, I have to resave the document with the original file name, but with the addition of my initials at the end. I tried to find a software program that would allow me to assign a hotkey to do this. Anyone know of anything available? I have tried Keyboard Express and Workspace Macro.
Some people die at 21 but aren't buried until they are 65.
User avatar
Bobbie En Tejas
Forum Addict
Forum Addict
 
Posts: 3535
Joined: Mon Oct 17, 2005 1:55 am
Location: Southwest of Campbeltown


Automation Tools - Freeware

Postby dtm » Sun Apr 16, 2006 11:59 pm

Automation Tools - Freeware
There are several Automation hotkey programs at nonag.com Winmacro looks a good bet.
http://www.nonags.com/nonags/auto.htm
Good luckImage
User avatar
dtm
Too Shy To Talk Much
Too Shy To Talk Much
 
Posts: 5
Joined: Sun Jul 17, 2005 12:35 am


Postby Bobbie En Tejas » Mon Apr 17, 2006 12:57 am

Thanks dtm. I tried the winmacro, but don't seem to be able to accomplish it either. I have also tried to do the macro in Word itself. It seems to save the macro with the file name of the file I was in when I made the macro :cry: .

Someone types work and sends it to me to edit. All I have to do is edit it, and save it with the original name and r.bg at the end. If the original file name is Smith.John.04-16-06.doc, I want it to be Smith.John.04-16-06.r.bg.doc when I hit a hotkey.

These are the keystrokes I use that I want a hotkey to do:
Alt-F
A
Right Arrow
Left Arrow
Left Arrow
Left Arrow
r.bg.
end
Alt-F
C

As you can see, nothing I do should erase the original file name, but it does. You'd think this would be simple :? Thanks again dtm. I'll go back later and see if there might be another program on that site that might work.
Some people die at 21 but aren't buried until they are 65.
User avatar
Bobbie En Tejas
Forum Addict
Forum Addict
 
Posts: 3535
Joined: Mon Oct 17, 2005 1:55 am
Location: Southwest of Campbeltown


Postby Jonathan » Mon Apr 17, 2006 1:01 pm

For a start your keystrokes are flawed - if you do a alt-f then a the name of the current document is already highlighted therefore when you do a right arrow it takes you to the end of the Save As prompt ie: after the .doc.

If you are manually editing 100s of files per day then surely to add in r.b.g. is the least of your worries!?

What I suspect you need to add into this macro is a string to leave the original filename alone but to add in RBG(states obvious) - I'd also consider dropping all those .s in the filenames.
Jonathan
Quite a Regular
Quite a Regular
 
Posts: 134
Joined: Tue May 10, 2005 8:21 am
Location: Larbert, Near Falkirk / Near Stirling


Postby Malky » Mon Apr 17, 2006 3:34 pm

I believe you can do this using a Word Macro, Bobbie.

Here's the long-winded approach as I'm unsure how you're doing this using the keystrokes you mention above. Better print this out.

This method adds a button to the Standard toolbar but you can always assign it to a shortcut key if you wish. By the way, I'm using Word 2000, but this should be similar on 2003.

Open Word. Type in Macro test.

On the Tools menu, point to Macro, and then click Record New Macro.

In the Macro name box, type a name for the macro. I used Add_Initials.

In the Store macro in box, I went with the All Documents (Normal Template).

In the Description box, type a description for the macro. I used Add Initials to FileName.

To assign the macro to a toolbar, click Toolbars. In the Commands box, click the macro you are recording, and drag it to the Standard toolbar. I put it beside the Save button.

The new button will probably be showing its full text name right now, so right click on it and shorten the Name to Initial. You probably want to give it an image, so (after right clicking) select Change Button Image. Choose your favourite image from the list - I went with one of the floppy disk ones with the arrow. I also clicked on Default style so that only the image shows on the toolbar.

Click Close to begin recording the macro.

Use the mouse for the following.

Click File.
Click Save As.
Just use the default name and click Save.

To stop recording your macro, click Stop Recording.

Now we need to edit the macro to make it work the way you want.

On the Tools menu, point to Macro, and then click Macros. Click on the Add_Initials macro and select Edit.
The first part of the Macro should be changed from
Code: Select all
ActiveDocument.SaveAs FileName:="Macro test.doc",

to
Code: Select all
ActiveDocument.SaveAs FileName:=Left(ActiveDocument.Name, Len(ActiveDocument.Name) - 4) & "-r.bg.doc",


What that does is backspace over the last 4 characters (the file extension - .doc) and replace it with your initials and the file extension again. You can change what's in the quote marks to anything you want.

That works for me Bobbie. Hope it helps you :wink:

Malky
User avatar
Malky
Forum Addict
Forum Addict
 
Posts: 1762
Joined: Mon Feb 28, 2005 11:08 pm


Postby Jonathan » Mon Apr 17, 2006 3:41 pm

Spot someone who knows about macros :D
Jonathan
Quite a Regular
Quite a Regular
 
Posts: 134
Joined: Tue May 10, 2005 8:21 am
Location: Larbert, Near Falkirk / Near Stirling


Postby Bobbie En Tejas » Mon Apr 17, 2006 5:45 pm

Jonathan wrote:For a start your keystrokes are flawed - if you do a alt-f then a the name of the current document is already highlighted therefore when you do a right arrow it takes you to the end of the Save As prompt ie: after the .doc.

If you are manually editing 100s of files per day then surely to add in r.b.g. is the least of your worries!?

What I suspect you need to add into this macro is a string to leave the original filename alone but to add in RBG(states obvious) - I'd also consider dropping all those .s in the filenames.


Jonathan, no, actually by hitting the right arrow it goes to the end and unhighlights everything. That is why I am confused. And you'd be surprised how much time would be saved and how many keystrokes just that one small change would make. That is about 16 keystrokes I can replace with 2 for each report. Multiply that by even only 100 files, and that is 1600 keystrokes rather than 200 a day, plus the toll that repetitive movements make on a person. See, you need to understand that lazy people always figure out better, more efficient ways of doing things to make their life easier :lol:

Great idea about the file names, Jonathan. Unfortunately, I have no control over how the files are named and all the information is important to have.

Malky thanks. I will try that and let you know.
Some people die at 21 but aren't buried until they are 65.
User avatar
Bobbie En Tejas
Forum Addict
Forum Addict
 
Posts: 3535
Joined: Mon Oct 17, 2005 1:55 am
Location: Southwest of Campbeltown


Postby Bobbie En Tejas » Mon Apr 17, 2006 5:57 pm

MALKY, I LOVE YOU!!

Image

It works!!
Some people die at 21 but aren't buried until they are 65.
User avatar
Bobbie En Tejas
Forum Addict
Forum Addict
 
Posts: 3535
Joined: Mon Oct 17, 2005 1:55 am
Location: Southwest of Campbeltown


Postby Malky » Mon Apr 17, 2006 6:15 pm

Aw shucks, Bobbie :D You can give me a big sloppy kiss next time you're over this side of the pond. :wink:

Malky
User avatar
Malky
Forum Addict
Forum Addict
 
Posts: 1762
Joined: Mon Feb 28, 2005 11:08 pm


Postby Bobbie En Tejas » Mon Apr 17, 2006 7:16 pm

That and a beer!
Some people die at 21 but aren't buried until they are 65.
User avatar
Bobbie En Tejas
Forum Addict
Forum Addict
 
Posts: 3535
Joined: Mon Oct 17, 2005 1:55 am
Location: Southwest of Campbeltown



Return to Technical Support

Who is online

Users browsing this forum: No registered users and 7 guests