Sign in to follow this  
Followers 0
mcbuddah

Microsoft Word Menu

8 posts in this topic

I am writing a script that changes the settings of Microsoft Word. I tried using keyboard shortcuts to access the menus, ex: Alt F for the "File Menu". But for the "Tools" menu (Alt T) when I use the Send command it inserts the current time of day.

Send("{ALTDOWN}TC{ALTUP}")

If you were to manually go in to word and hit "Shift" "Alt" "T", this would insert the time. But no where in my script do I use the Shift key.

I'm stumped. :ph34r:

Share this post


Link to post
Share on other sites



That works fine for me. I open a new document in WinWord (version 2002 or "Office XP") and use the following script:

WinActivate("Document1 - Microsoft Word")
Send("{ALTDOWN}tc{ALTUP}")

The following code also worked for me:

WinActivate("Document1 - Microsoft Word")
Send("!tc")

[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

Share this post


Link to post
Share on other sites

I am writing a script that changes the settings of Microsoft Word. I tried using keyboard shortcuts to access the menus, ex: Alt F for the "File Menu". But for the "Tools" menu (Alt T) when I use the Send command it inserts the current time of day.

Send("{ALTDOWN}TC{ALTUP}")

If you were to manually go in to word and hit "Shift" "Alt" "T", this would insert the time. But no where in my script do I use the Shift key.

I'm stumped. :ph34r:

sending "T" is different than sending "t" , it sends it as shift+t if it's uppercase.

"I'm not even supposed to be here today!" -Dante (Hicks)

Share this post


Link to post
Share on other sites

sending "T" is different than sending "t" , it sends it as shift+t if it's uppercase.

Heh, somehow I managed to miss that. That's what I get for typing in the script myself instead of copy and pasting it. I just fixed the error when I re-typed it. :ph34r:

[font="Optima"]"Standing in the rain, twisted and insane, we are holding onto nothing.Feeling every breath, holding no regrets, we're still looking out for something."[/font]Note: my projects are off-line until I can spend more time to make them compatable with syntax changes.

Share this post


Link to post
Share on other sites

sending "T" is different than sending "t" , it sends it as shift+t if it's uppercase.

So all I had to do was turn off the caps lock. :ph34r:

Share this post


Link to post
Share on other sites
:ph34r: yeah, gotta watch out for that caps lock key, it's EVIL!

"I'm not even supposed to be here today!" -Dante (Hicks)

Share this post


Link to post
Share on other sites

On the topic of menu bars, anyone know why don't Windows apps have control IDs for the menu bar?

I wish I could send commands to the menu bar like I can with buttons and checkboxes--do I have to settle for Send()?

Thanks in advance...

Share this post


Link to post
Share on other sites
WinMenuSelectItem() will do the job for most menu bars.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0