A Windows 98 & ME forum. Win98banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Win98banter forum » Windows 98 » General
Site Map Home Authors List Search Today's Posts Mark Forums Read Web Partners

Activate Word without starting new Word instance



 
 
Thread Tools Display Modes
  #1  
Old February 8th 05, 04:32 AM
Larry
external usenet poster
 
Posts: n/a
Default Activate Word without starting new Word instance

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?



  #2  
Old February 8th 05, 04:58 AM
glee
external usenet poster
 
Posts: n/a
Default

What do you mean by "activate Word"?
Have you tried asking this on a Word or Office forum, since it appears to be a Word
question, not a Windows question?
--
Glen Ventura, MS MVP Shell/User, A+
http://dts-l.org/goodpost.htm

"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?




  #3  
Old February 8th 05, 05:42 AM
Jezebel
external usenet poster
 
Posts: n/a
Default

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?





  #4  
Old February 8th 05, 06:06 AM
Larry
external usenet poster
 
Posts: n/a
Default

Since my question involves both Word and the Windows envionment, I cross
posted to a Word vba group, which you might have noticed if you had
looked at the To line.

To activate means to bring a minimized or inactive window to the fore,
so that it becomes the active window. This is different from opening a
window or a program, which means starting up a program that is closed.



glee wrote:
What do you mean by "activate Word"?
Have you tried asking this on a Word or Office forum, since it
appears to be a Word question, not a Windows question?

"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?



  #5  
Old February 8th 05, 06:20 AM
Larry
external usenet poster
 
Posts: n/a
Default



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?



  #6  
Old February 8th 05, 06:39 AM
Jezebel
external usenet poster
 
Posts: n/a
Default

This makes no sense at all. Macros are located within a Word module, so you
have to instantiate Word to run them. The code I offered is for VB not VBA.




"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?





  #7  
Old February 8th 05, 08:33 AM
Jeff Richards
external usenet poster
 
Posts: n/a
Default

Why wouldn't you just click on the icon in the taskbar? There's no need to
use VBA to do this, so I don't understand why you would ask this in a VBA
newsgroup.

Or are you trying to write a WORD macro that will activate a minimized
Window? In that case, what is the event or action that you are going to use
in order to know when this should happen?
--
Jeff Richards
MS MVP (Windows - Shell/User)
"Larry" wrote in message
...
Since my question involves both Word and the Windows envionment, I cross
posted to a Word vba group, which you might have noticed if you had
looked at the To line.

To activate means to bring a minimized or inactive window to the fore,
so that it becomes the active window. This is different from opening a
window or a program, which means starting up a program that is closed.



glee wrote:
What do you mean by "activate Word"?
Have you tried asking this on a Word or Office forum, since it
appears to be a Word question, not a Windows question?

"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?





  #8  
Old February 8th 05, 11:15 AM
Jonathan West
external usenet poster
 
Posts: n/a
Default

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.

--
Regards
Jonathan West - Word MVP
www.intelligentdocuments.co.uk
Please reply to the newsgroup

"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?




  #9  
Old February 8th 05, 01:21 PM
glee
external usenet poster
 
Posts: n/a
Default

In Windows, making an open window the active window is usually called putting the
window in "focus". That is the same for all open windows. You are not trying to
"activate Word" (which is a program); you are trying to make active an open window.
it helps if you make clear what you are trying to do, in the first place.

As Jeff asked, why aren't you just clicking the taskbar button to toggle focus on
the window? Apparently you are trying to use a macro for some reason, and that is
outside the scope of this group, so I fail to see why you think crossposting it to a
win98 group was necessary.

Good luck......it look like the people in the vba group are setting you straight.
--
Glen Ventura, MS MVP Shell/User, A+
http://dts-l.org/goodpost.htm


"Larry" wrote in message
...
Since my question involves both Word and the Windows envionment, I cross
posted to a Word vba group, which you might have noticed if you had
looked at the To line.

To activate means to bring a minimized or inactive window to the fore,
so that it becomes the active window. This is different from opening a
window or a program, which means starting up a program that is closed.



glee wrote:
What do you mean by "activate Word"?
Have you tried asking this on a Word or Office forum, since it
appears to be a Word question, not a Windows question?

"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?




  #10  
Old February 10th 05, 12:00 AM
Larry
external usenet poster
 
Posts: n/a
Default

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?



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Microsolf Word - freezes when starting up and shutting down Bonnie Olson General 2 October 7th 04 06:06 AM
Need Help Please : Microsoft WORD " not responding" and OE FREEZES kim shapiro General 9 August 26th 04 10:12 PM
Problems with Word 2000 crash George Gee General 6 July 10th 04 10:08 PM
WORD DOCS SCOTT MORTON General 7 June 8th 04 12:03 PM
MS Word for Win98 SE? Dick Wisan Software & Applications 2 May 25th 04 08:14 PM


All times are GMT +1. The time now is 04:03 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Win98banter.
The comments are property of their posters.