Win98banter

Win98banter (http://www.win98banter.com/index.php)
-   General (http://www.win98banter.com/forumdisplay.php?f=7)
-   -   Activate Word without starting new Word instance (http://www.win98banter.com/showthread.php?t=24780)

fumei February 11th 05 08:01 PM

There are LOTS of keyboard mappers out there. It seems to me, from your last
post, that is what you want. A single keystroke to get back to Word.

Trying to do this with ONE keystroke (not some Ctrl-keycharacter,
Alt-keycharacter combination - not much different from using Alt-Tab, or your
mouse) via code...well, no offence, but it seems, especially with the amount
of keystrokes written into this thread, a large amount of work for little
return.

Find a key mapper.

"Larry" wrote:

All I really want is to be able, using a single keystroke not the mouse,
to bring the focus to the already open Word window. Not using Alt+Tab,
not using the Mouse to click on the task bar button, but to use a
keystroke that perhaps runs a .vbs file that makes the open Word
instance the active window.

I'm constantly going back and forth between Word and other application
windows, and I want an instant, keyboard-oriented, one-step way of
returning to the Word window.

Larry



Jonathan West wrote:
If you want to get hold of an existing instance of Word, then you
should use GetObject as Jezebel described to get an object reference
to it. Then you can use the Run method of the Word Application object
to run the macro.


"Larry" wrote in message
...


Thanks Jezebel.

Since it is possible from the Run dialog box to start Word and run a
macro in one step, I'm thinking that if, with Word open but not
active, I ran the macro I'm looking for, I could get a macro that
activated the open Word window without opening a second instance of
Word.

However, when I create a macro in Normal called WordActivate using
the code you suggested,

Dim wrdApp as object
On error resume next
Set wrdApp = GetObject("Word.Application")

and (with Word open but not active) run this in the Run dialog box:

Winword.exe /mWordActivate

A second instance of Word opens.

The same happens when I put the other set of code in WordActivate.

Any other ideas? Thanks much.

Larry




Jezebel wrote:
If you mean from VB, there are two methods --

1) Late binding

Dim wrdApp as object
On error resume next
Set wrdApp = GetObject("Word.Application")
If wrdApp is nothing then
.... Word was not running .... no instance to get


or 2) Early binding

Dim wrdApp as Word.Application
On error resume next
Set wrdApp = Word.Application
If wrdApp is nothing then
.... Word was not running .... no instance to get




"Larry" wrote in message
...
I would be great to find a way to activate Word without
starting a new Word instance. I think I asked about this a
year or two ago, and didn't get anywhere. Any ideas?





Larry February 13th 05 06:23 AM

Of course. By "keystroke" I mean a single key combination, such as
Ctrl+X, or Winkey plus W, or whatever.

But the issue is not the particular keyboard configuation; the issue is
finding a single command that puts' Windows' focus on the current open
Word instance without my having to tab through a bunch of alt+tab steps
and so on.

Larry



fumei wrote:
There are LOTS of keyboard mappers out there. It seems to me, from
your last post, that is what you want. A single keystroke to get
back to Word.

Trying to do this with ONE keystroke (not some Ctrl-keycharacter,
Alt-keycharacter combination - not much different from using Alt-Tab,
or your mouse) via code...well, no offence, but it seems, especially
with the amount of keystrokes written into this thread, a large
amount of work for little return.

Find a key mapper.

"Larry" wrote:

All I really want is to be able, using a single keystroke not the
mouse, to bring the focus to the already open Word window. Not
using Alt+Tab, not using the Mouse to click on the task bar button,
but to use a keystroke that perhaps runs a .vbs file that makes the
open Word instance the active window.

I'm constantly going back and forth between Word and other
application windows, and I want an instant, keyboard-oriented,
one-step way of returning to the Word window.

Larry



Jonathan West wrote:
If you want to get hold of an existing instance of Word, then you
should use GetObject as Jezebel described to get an object
reference to it. Then you can use the Run method of the Word
Application object to run the macro.


"Larry" wrote in message
...


Thanks Jezebel.

Since it is possible from the Run dialog box to start Word and
run a macro in one step, I'm thinking that if, with Word open
but not active, I ran the macro I'm looking for, I could get a
macro that activated the open Word window without opening a
second instance of Word.

However, when I create a macro in Normal called WordActivate
using the code you suggested,

Dim wrdApp as object
On error resume next
Set wrdApp = GetObject("Word.Application")

and (with Word open but not active) run this in the Run dialog
box:

Winword.exe /mWordActivate

A second instance of Word opens.

The same happens when I put the other set of code in
WordActivate.

Any other ideas? Thanks much.

Larry




Jezebel wrote:
If you mean from VB, there are two methods --

1) Late binding

Dim wrdApp as object
On error resume next
Set wrdApp = GetObject("Word.Application")
If wrdApp is nothing then
.... Word was not running .... no instance to get


or 2) Early binding

Dim wrdApp as Word.Application
On error resume next
Set wrdApp = Word.Application
If wrdApp is nothing then
.... Word was not running .... no instance to get




"Larry" wrote in message
...
I would be great to find a way to activate Word without
starting a new Word instance. I think I asked about this a
year or two ago, and didn't get anywhere. Any ideas?




Gary S. Terhune February 13th 05 06:51 AM

Would take a script to do that. Then make a shortcut to that, then
assign a keystroke combo to that. Question: What does the Script do when
there's two instances of Word open?

--
Gary S. Terhune
MS MVP Shell/User
http://www.grystmill.com/articles/cleanboot.htm
http://www.grystmill.com/articles/security.htm

"Larry" wrote in message
...
Of course. By "keystroke" I mean a single key combination, such as
Ctrl+X, or Winkey plus W, or whatever.

But the issue is not the particular keyboard configuation; the issue

is
finding a single command that puts' Windows' focus on the current open
Word instance without my having to tab through a bunch of alt+tab

steps
and so on.

Larry



fumei wrote:
There are LOTS of keyboard mappers out there. It seems to me, from
your last post, that is what you want. A single keystroke to get
back to Word.

Trying to do this with ONE keystroke (not some Ctrl-keycharacter,
Alt-keycharacter combination - not much different from using

Alt-Tab,
or your mouse) via code...well, no offence, but it seems, especially
with the amount of keystrokes written into this thread, a large
amount of work for little return.

Find a key mapper.

"Larry" wrote:

All I really want is to be able, using a single keystroke not the
mouse, to bring the focus to the already open Word window. Not
using Alt+Tab, not using the Mouse to click on the task bar

button,
but to use a keystroke that perhaps runs a .vbs file that makes

the
open Word instance the active window.

I'm constantly going back and forth between Word and other
application windows, and I want an instant, keyboard-oriented,
one-step way of returning to the Word window.

Larry



Jonathan West wrote:
If you want to get hold of an existing instance of Word, then

you
should use GetObject as Jezebel described to get an object
reference to it. Then you can use the Run method of the Word
Application object to run the macro.


"Larry" wrote in message
...


Thanks Jezebel.

Since it is possible from the Run dialog box to start Word and
run a macro in one step, I'm thinking that if, with Word open
but not active, I ran the macro I'm looking for, I could get a
macro that activated the open Word window without opening a
second instance of Word.

However, when I create a macro in Normal called WordActivate
using the code you suggested,

Dim wrdApp as object
On error resume next
Set wrdApp = GetObject("Word.Application")

and (with Word open but not active) run this in the Run dialog
box:

Winword.exe /mWordActivate

A second instance of Word opens.

The same happens when I put the other set of code in
WordActivate.

Any other ideas? Thanks much.

Larry




Jezebel wrote:
If you mean from VB, there are two methods --

1) Late binding

Dim wrdApp as object
On error resume next
Set wrdApp = GetObject("Word.Application")
If wrdApp is nothing then
.... Word was not running .... no instance to get


or 2) Early binding

Dim wrdApp as Word.Application
On error resume next
Set wrdApp = Word.Application
If wrdApp is nothing then
.... Word was not running .... no instance to get




"Larry" wrote in message
...
I would be great to find a way to activate Word without
starting a new Word instance. I think I asked about this

a
year or two ago, and didn't get anywhere. Any ideas?





Larry February 14th 05 05:28 AM

Well, I almost never have two instances of Word open, so that's not an
issue.

But if there's a .vbs script to do this (bring focus to the Word window
without opening a new instance of Word), I would love to find it.

Larry



Gary S. Terhune wrote:
Would take a script to do that. Then make a shortcut to that, then
assign a keystroke combo to that. Question: What does the Script do
when there's two instances of Word open?


"Larry" wrote in message
...
Of course. By "keystroke" I mean a single key combination, such as
Ctrl+X, or Winkey plus W, or whatever.

But the issue is not the particular keyboard configuation; the issue

is
finding a single command that puts' Windows' focus on the current
open Word instance without my having to tab through a bunch of
alt+tab

steps
and so on.

Larry



fumei wrote:
There are LOTS of keyboard mappers out there. It seems to me,
from your last post, that is what you want. A single keystroke
to get back to Word.

Trying to do this with ONE keystroke (not some Ctrl-keycharacter,
Alt-keycharacter combination - not much different from using

Alt-Tab,
or your mouse) via code...well, no offence, but it seems,
especially with the amount of keystrokes written into this
thread, a large amount of work for little return.

Find a key mapper.

"Larry" wrote:

All I really want is to be able, using a single keystroke not
the mouse, to bring the focus to the already open Word window.
Not using Alt+Tab, not using the Mouse to click on the task bar

button,
but to use a keystroke that perhaps runs a .vbs file that makes

the
open Word instance the active window.

I'm constantly going back and forth between Word and other
application windows, and I want an instant, keyboard-oriented,
one-step way of returning to the Word window.

Larry



Jonathan West wrote:
If you want to get hold of an existing instance of Word, then

you
should use GetObject as Jezebel described to get an object
reference to it. Then you can use the Run method of the Word
Application object to run the macro.


"Larry" wrote in message
...


Thanks Jezebel.

Since it is possible from the Run dialog box to start Word
and run a macro in one step, I'm thinking that if, with
Word open but not active, I ran the macro I'm looking for,
I could get a macro that activated the open Word window
without opening a second instance of Word.

However, when I create a macro in Normal called WordActivate
using the code you suggested,

Dim wrdApp as object
On error resume next
Set wrdApp = GetObject("Word.Application")

and (with Word open but not active) run this in the Run
dialog box:

Winword.exe /mWordActivate

A second instance of Word opens.

The same happens when I put the other set of code in
WordActivate.

Any other ideas? Thanks much.

Larry




Jezebel wrote:
If you mean from VB, there are two methods --

1) Late binding

Dim wrdApp as object
On error resume next
Set wrdApp = GetObject("Word.Application")
If wrdApp is nothing then
.... Word was not running .... no instance to get


or 2) Early binding

Dim wrdApp as Word.Application
On error resume next
Set wrdApp = Word.Application
If wrdApp is nothing then
.... Word was not running .... no instance to get




"Larry" wrote in message
...
I would be great to find a way to activate Word without
starting a new Word instance. I think I asked about
this

a
year or two ago, and didn't get anywhere. Any ideas?




Gary S. Terhune February 14th 05 07:00 AM

I don't know of one already in existence, I'm just fairly certain I can
do it. When I get a breather, here, I'll see what I can come up with.
I'll also see if I can come up with a way to handle the
more-than-one-instance-of-Word issue.

I don't post scripts here. Scripts as attachments are very frowned upon,
even if they have a TXT extension, and code that can't be allowed to
wrap usually gets wrapped by newsreaders if I include it in the body,
making it worthless. So email me, to verify your address.

Which brings up the subject that I neglected last time I responded to
you. Using your real email address in newsgroups invites tons of SPAM,
both the harmless but annoying kind and the very dangerous kind. Email
addresses in public forums also get used as "From" addresses by bots
that spread SPAM and viruses. You only know this is happening when you
start getting Bounce notices regarding viruses in emails you never sent
to people you don't know. It's too late, now, for the address you're
using here, but your might want to consider changing your address and
putting this one to rest. Newsgroup accounts permit using fake
addresses. Trick is to not use one that *could_be* someone's real
address. Take a look around at some of the other posts here for
examples. Me, I use a real address so people can contact me via email if
they really have to--but I use it *only* for NG posting and put up with
the related inconvenience as a public service.

--
Gary S. Terhune
MS MVP Shell/User
http://www.grystmill.com/articles/cleanboot.htm
http://www.grystmill.com/articles/security.htm

"Larry" wrote in message
...
Well, I almost never have two instances of Word open, so that's not an
issue.

But if there's a .vbs script to do this (bring focus to the Word

window
without opening a new instance of Word), I would love to find it.

Larry



Gary S. Terhune wrote:
Would take a script to do that. Then make a shortcut to that, then
assign a keystroke combo to that. Question: What does the Script do
when there's two instances of Word open?


"Larry" wrote in message
...
Of course. By "keystroke" I mean a single key combination, such

as
Ctrl+X, or Winkey plus W, or whatever.

But the issue is not the particular keyboard configuation; the

issue
is
finding a single command that puts' Windows' focus on the current
open Word instance without my having to tab through a bunch of
alt+tab

steps
and so on.

Larry



fumei wrote:
There are LOTS of keyboard mappers out there. It seems to me,
from your last post, that is what you want. A single keystroke
to get back to Word.

Trying to do this with ONE keystroke (not some

Ctrl-keycharacter,
Alt-keycharacter combination - not much different from using

Alt-Tab,
or your mouse) via code...well, no offence, but it seems,
especially with the amount of keystrokes written into this
thread, a large amount of work for little return.

Find a key mapper.

"Larry" wrote:

All I really want is to be able, using a single keystroke not
the mouse, to bring the focus to the already open Word window.
Not using Alt+Tab, not using the Mouse to click on the task

bar
button,
but to use a keystroke that perhaps runs a .vbs file that

makes
the
open Word instance the active window.

I'm constantly going back and forth between Word and other
application windows, and I want an instant, keyboard-oriented,
one-step way of returning to the Word window.

Larry



Jonathan West wrote:
If you want to get hold of an existing instance of Word,

then
you
should use GetObject as Jezebel described to get an object
reference to it. Then you can use the Run method of the Word
Application object to run the macro.


"Larry" wrote in message
...


Thanks Jezebel.

Since it is possible from the Run dialog box to start Word
and run a macro in one step, I'm thinking that if, with
Word open but not active, I ran the macro I'm looking for,
I could get a macro that activated the open Word window
without opening a second instance of Word.

However, when I create a macro in Normal called

WordActivate
using the code you suggested,

Dim wrdApp as object
On error resume next
Set wrdApp = GetObject("Word.Application")

and (with Word open but not active) run this in the Run
dialog box:

Winword.exe /mWordActivate

A second instance of Word opens.

The same happens when I put the other set of code in
WordActivate.

Any other ideas? Thanks much.

Larry




Jezebel wrote:
If you mean from VB, there are two methods --

1) Late binding

Dim wrdApp as object
On error resume next
Set wrdApp = GetObject("Word.Application")
If wrdApp is nothing then
.... Word was not running .... no instance to get


or 2) Early binding

Dim wrdApp as Word.Application
On error resume next
Set wrdApp = Word.Application
If wrdApp is nothing then
.... Word was not running .... no instance to get




"Larry" wrote in message
...
I would be great to find a way to activate Word

without
starting a new Word instance. I think I asked about
this

a
year or two ago, and didn't get anywhere. Any ideas?





Larry February 16th 05 12:11 AM

Ok, I'll send you my e-mail address (but couldn't you just copy the code
of the .vbs file into a news message?).
..
As for using a fake address in the newsgroups, I thought I had changed
it to a fake address some time back, but I guess it didn't take. I'll
have to look again into how this is done using OE6.

Thanks,
Larry





"Gary S. Terhune" wrote in message
...
I don't know of one already in existence, I'm just fairly certain I

can
do it. When I get a breather, here, I'll see what I can come up with.
I'll also see if I can come up with a way to handle the
more-than-one-instance-of-Word issue.

I don't post scripts here. Scripts as attachments are very frowned

upon,
even if they have a TXT extension, and code that can't be allowed to
wrap usually gets wrapped by newsreaders if I include it in the body,
making it worthless. So email me, to verify your address.

Which brings up the subject that I neglected last time I responded to
you. Using your real email address in newsgroups invites tons of SPAM,
both the harmless but annoying kind and the very dangerous kind. Email
addresses in public forums also get used as "From" addresses by bots
that spread SPAM and viruses. You only know this is happening when you
start getting Bounce notices regarding viruses in emails you never

sent
to people you don't know. It's too late, now, for the address you're
using here, but your might want to consider changing your address and
putting this one to rest. Newsgroup accounts permit using fake
addresses. Trick is to not use one that *could_be* someone's real
address. Take a look around at some of the other posts here for
examples. Me, I use a real address so people can contact me via email

if
they really have to--but I use it *only* for NG posting and put up

with
the related inconvenience as a public service.

--
Gary S. Terhune
MS MVP Shell/User
http://www.grystmill.com/articles/cleanboot.htm
http://www.grystmill.com/articles/security.htm

"Larry" wrote in message
...
Well, I almost never have two instances of Word open, so that's not

an
issue.

But if there's a .vbs script to do this (bring focus to the Word

window
without opening a new instance of Word), I would love to find it.

Larry



Gary S. Terhune wrote:
Would take a script to do that. Then make a shortcut to that, then
assign a keystroke combo to that. Question: What does the Script

do
when there's two instances of Word open?


"Larry" wrote in message
...
Of course. By "keystroke" I mean a single key combination, such

as
Ctrl+X, or Winkey plus W, or whatever.

But the issue is not the particular keyboard configuation; the

issue
is
finding a single command that puts' Windows' focus on the

current
open Word instance without my having to tab through a bunch of
alt+tab
steps
and so on.

Larry



fumei wrote:
There are LOTS of keyboard mappers out there. It seems to me,
from your last post, that is what you want. A single

keystroke
to get back to Word.

Trying to do this with ONE keystroke (not some

Ctrl-keycharacter,
Alt-keycharacter combination - not much different from using
Alt-Tab,
or your mouse) via code...well, no offence, but it seems,
especially with the amount of keystrokes written into this
thread, a large amount of work for little return.

Find a key mapper.

"Larry" wrote:

All I really want is to be able, using a single keystroke

not
the mouse, to bring the focus to the already open Word

window.
Not using Alt+Tab, not using the Mouse to click on the task

bar
button,
but to use a keystroke that perhaps runs a .vbs file that

makes
the
open Word instance the active window.

I'm constantly going back and forth between Word and other
application windows, and I want an instant,

keyboard-oriented,
one-step way of returning to the Word window.

Larry



Jonathan West wrote:
If you want to get hold of an existing instance of Word,

then
you
should use GetObject as Jezebel described to get an object
reference to it. Then you can use the Run method of the

Word
Application object to run the macro.


"Larry" wrote in message
...


Thanks Jezebel.

Since it is possible from the Run dialog box to start

Word
and run a macro in one step, I'm thinking that if, with
Word open but not active, I ran the macro I'm looking

for,
I could get a macro that activated the open Word window
without opening a second instance of Word.

However, when I create a macro in Normal called

WordActivate
using the code you suggested,

Dim wrdApp as object
On error resume next
Set wrdApp = GetObject("Word.Application")

and (with Word open but not active) run this in the Run
dialog box:

Winword.exe /mWordActivate

A second instance of Word opens.

The same happens when I put the other set of code in
WordActivate.

Any other ideas? Thanks much.

Larry




Jezebel wrote:
If you mean from VB, there are two methods --

1) Late binding

Dim wrdApp as object
On error resume next
Set wrdApp = GetObject("Word.Application")
If wrdApp is nothing then
.... Word was not running .... no instance to get


or 2) Early binding

Dim wrdApp as Word.Application
On error resume next
Set wrdApp = Word.Application
If wrdApp is nothing then
.... Word was not running .... no instance to get




"Larry" wrote in message
...
I would be great to find a way to activate Word

without
starting a new Word instance. I think I asked about
this
a
year or two ago, and didn't get anywhere. Any

ideas?






Gary S. Terhune February 16th 05 12:48 AM

"Larry" wrote in message
...
Ok, I'll send you my e-mail address (but couldn't you just copy the

code
of the .vbs file into a news message?).


Because most news readers wrap text to ~80 characters, and insert line
returns. If a line ends up being 110 characters, it will wrap, and how
will you know where it's wrapping, where to fix it, s?

.
As for using a fake address in the newsgroups, I thought I had changed
it to a fake address some time back, but I guess it didn't take. I'll
have to look again into how this is done using OE6.


If your fake address is that one that shows above, then it isn't fake
enough. Someone in this world might actually have larry328 at att.net as
their real address. A proper munged address is one that is poorly
formed--that can't possibly be a real address.

--
Gary S. Terhune
MS MVP Shell/User
http://www.grystmill.com/articles/cleanboot.htm
http://www.grystmill.com/articles/security.htm



Larry February 17th 05 05:33 PM

On the fake address, I've just redone it, by going into Tools, Accounts
and changing the e-mail address under the default news account. Hope
that works.

Larry


"Gary S. Terhune" wrote in message
...
"Larry" wrote in message
...
Ok, I'll send you my e-mail address (but couldn't you just copy the

code
of the .vbs file into a news message?).


Because most news readers wrap text to ~80 characters, and insert line
returns. If a line ends up being 110 characters, it will wrap, and how
will you know where it's wrapping, where to fix it, s?

.
As for using a fake address in the newsgroups, I thought I had

changed
it to a fake address some time back, but I guess it didn't take.

I'll
have to look again into how this is done using OE6.


If your fake address is that one that shows above, then it isn't fake
enough. Someone in this world might actually have larry328 at att.net

as
their real address. A proper munged address is one that is poorly
formed--that can't possibly be a real address.

--
Gary S. Terhune
MS MVP Shell/User
http://www.grystmill.com/articles/cleanboot.htm
http://www.grystmill.com/articles/security.htm





Gary S. Terhune February 17th 05 07:22 PM

Works fine--but if the previous was your real address, then its already
on tons of lists. If it was someone else's address, then you have
apologies to make, s.

--
Gary S. Terhune
MS MVP Shell/User
http://www.grystmill.com/articles/cleanboot.htm
http://www.grystmill.com/articles/security.htm

"Larry" wrote in message
...
On the fake address, I've just redone it, by going into Tools,

Accounts
and changing the e-mail address under the default news account. Hope
that works.

Larry


"Gary S. Terhune" wrote in message
...
"Larry" wrote in message
...
Ok, I'll send you my e-mail address (but couldn't you just copy

the
code
of the .vbs file into a news message?).


Because most news readers wrap text to ~80 characters, and insert

line
returns. If a line ends up being 110 characters, it will wrap, and

how
will you know where it's wrapping, where to fix it, s?

.
As for using a fake address in the newsgroups, I thought I had

changed
it to a fake address some time back, but I guess it didn't take.

I'll
have to look again into how this is done using OE6.


If your fake address is that one that shows above, then it isn't

fake
enough. Someone in this world might actually have larry328 at

att.net
as
their real address. A proper munged address is one that is poorly
formed--that can't possibly be a real address.

--
Gary S. Terhune
MS MVP Shell/User
http://www.grystmill.com/articles/cleanboot.htm
http://www.grystmill.com/articles/security.htm






Larry February 18th 05 12:56 AM

No, it was my real address, but not my default address.



Gary S. Terhune wrote:
Works fine--but if the previous was your real address, then its
already on tons of lists. If it was someone else's address, then you
have apologies to make, s.


"Larry" wrote in message
...
On the fake address, I've just redone it, by going into Tools,

Accounts
and changing the e-mail address under the default news account.
Hope that works.

Larry


"Gary S. Terhune" wrote in message
...
"Larry" wrote in message
...
Ok, I'll send you my e-mail address (but couldn't you just copy

the
code
of the .vbs file into a news message?).

Because most news readers wrap text to ~80 characters, and insert

line
returns. If a line ends up being 110 characters, it will wrap, and

how
will you know where it's wrapping, where to fix it, s?

.
As for using a fake address in the newsgroups, I thought I had

changed
it to a fake address some time back, but I guess it didn't take.

I'll
have to look again into how this is done using OE6.

If your fake address is that one that shows above, then it isn't

fake
enough. Someone in this world might actually have larry328 at

att.net
as
their real address. A proper munged address is one that is poorly
formed--that can't possibly be a real address.

--
Gary S. Terhune
MS MVP Shell/User
http://www.grystmill.com/articles/cleanboot.htm
http://www.grystmill.com/articles/security.htm





All times are GMT +1. The time now is 07:16 AM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Win98Banter.com