Discussion:
Word API will not launch Word
(too old to reply)
Ben
2008-10-25 00:02:01 UTC
Permalink
Hi All,

I am using very simple MS Word API code to launch MS Word (2003), and it is
only creating the WinWord.exe but does not actually launch MS Word:

Private Sub Command1_Click()
Dim newApp As Word.Application
Set newApp = New Application
newApp.Visible = True
End Sub

This works fine on other machines with MS Word, but there are two machines
that just creates the WinWord.exe process, but MS Word never launches. I
have tried repairing MS Word on one of the machines without success. I
checked virus software settings however nothing seems to have changed to
cause this problem. Any ideas? Thanks in advance,
Tony Jollans
2008-10-25 06:41:18 UTC
Permalink
I'm not quite sure what you mean, and you don't say where you are running
from - are you in Word and wanting to create a new instance of Word, or
what? It would be better to Set newApp = New Word.Application rather than
Set newApp = New Application, but better still, I think, to Set newApp =
CreateObject("Word.Application").
--
Enjoy,
Tony

www.WordArticles.com
Post by Ben
Hi All,
I am using very simple MS Word API code to launch MS Word (2003), and it is
Private Sub Command1_Click()
Dim newApp As Word.Application
Set newApp = New Application
newApp.Visible = True
End Sub
This works fine on other machines with MS Word, but there are two machines
that just creates the WinWord.exe process, but MS Word never launches. I
have tried repairing MS Word on one of the machines without success. I
checked virus software settings however nothing seems to have changed to
cause this problem. Any ideas? Thanks in advance,
Ben
2008-10-26 05:29:00 UTC
Permalink
Hi Tony,

Thank you for the reply. To clarify, I am running this in VB as a test to
see if Word is working properly. I make a simple .exe from this code,
running it on 8/10 machines works, but fails on two. The winword.exe gets
created on both machines, but word does not show. On the other machines, it
works as expected (word is launched and is visible on the screen). I have
never seen this before, and not even sure how to begin troubleshooting this
problem. I've uninstalled/reinstalled Word (2003 SP3), but the problem
remains. Any ideas? Thanks again,
Post by Tony Jollans
I'm not quite sure what you mean, and you don't say where you are running
from - are you in Word and wanting to create a new instance of Word, or
what? It would be better to Set newApp = New Word.Application rather than
Set newApp = New Application, but better still, I think, to Set newApp =
CreateObject("Word.Application").
--
Enjoy,
Tony
www.WordArticles.com
Post by Ben
Hi All,
I am using very simple MS Word API code to launch MS Word (2003), and it is
Private Sub Command1_Click()
Dim newApp As Word.Application
Set newApp = New Application
newApp.Visible = True
End Sub
This works fine on other machines with MS Word, but there are two machines
that just creates the WinWord.exe process, but MS Word never launches. I
have tried repairing MS Word on one of the machines without success. I
checked virus software settings however nothing seems to have changed to
cause this problem. Any ideas? Thanks in advance,
Cindy M.
2008-10-27 11:01:49 UTC
Permalink
Hi Ben,
Post by Ben
To clarify, I am running this in VB as a test to
see if Word is working properly. I make a simple .exe from this code,
running it on 8/10 machines works, but fails on two. The winword.exe gets
created on both machines, but word does not show. On the other machines, it
works as expected (word is launched and is visible on the screen). I have
never seen this before, and not even sure how to begin troubleshooting this
problem. I've uninstalled/reinstalled Word (2003 SP3), but the problem
remains
I take it you're seeing WinWord.exe in the Task Manager, then?

Do you see anything odd on these machines if you start Word "normally", or by
double-clicking on a document? (I'm wondering if there's an AutoExec macro
interfering, for example.)

If you modify your code to create a document, and you put a newApp.Activate
command in there (try both before and after the Visible) does that make any
difference in the result?

How about starting Windows in Safe Mode?

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)
Ben
2008-10-27 17:39:01 UTC
Permalink
Hi Cindy,

Thanks for the reply. Yes, I am seeing WinWord.exe in task manager. I can
start MS Word normally without any problems, and can also launch documents
without any problems. I deleted the normal.dot and re-launched Word to make
sure there was nothing funny running on startup. I've made the modifications
to my sample code to make sure the problem wasn't related to my test code,
but same results. Running Windows in safe mode yields the same results, so
not sure what else to check. Uninstalling/Reinstalling Office does not fix
the problem. Any other ideas? Thanks again,

- Ben
Post by Cindy M.
Hi Ben,
Post by Ben
To clarify, I am running this in VB as a test to
see if Word is working properly. I make a simple .exe from this code,
running it on 8/10 machines works, but fails on two. The winword.exe gets
created on both machines, but word does not show. On the other machines, it
works as expected (word is launched and is visible on the screen). I have
never seen this before, and not even sure how to begin troubleshooting this
problem. I've uninstalled/reinstalled Word (2003 SP3), but the problem
remains
I take it you're seeing WinWord.exe in the Task Manager, then?
Do you see anything odd on these machines if you start Word "normally", or by
double-clicking on a document? (I'm wondering if there's an AutoExec macro
interfering, for example.)
If you modify your code to create a document, and you put a newApp.Activate
command in there (try both before and after the Visible) does that make any
difference in the result?
How about starting Windows in Safe Mode?
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org
This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)
Doug Robbins - Word MVP
2008-10-27 19:26:14 UTC
Permalink
Compare what is listed when you select Templates and AddIns from the Tools
menu on the machines that work and on those that do not.
--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
Post by Ben
Hi Cindy,
Thanks for the reply. Yes, I am seeing WinWord.exe in task manager. I can
start MS Word normally without any problems, and can also launch documents
without any problems. I deleted the normal.dot and re-launched Word to make
sure there was nothing funny running on startup. I've made the modifications
to my sample code to make sure the problem wasn't related to my test code,
but same results. Running Windows in safe mode yields the same results, so
not sure what else to check. Uninstalling/Reinstalling Office does not fix
the problem. Any other ideas? Thanks again,
- Ben
Post by Cindy M.
Hi Ben,
Post by Ben
To clarify, I am running this in VB as a test to
see if Word is working properly. I make a simple .exe from this code,
running it on 8/10 machines works, but fails on two. The winword.exe gets
created on both machines, but word does not show. On the other machines, it
works as expected (word is launched and is visible on the screen). I have
never seen this before, and not even sure how to begin troubleshooting this
problem. I've uninstalled/reinstalled Word (2003 SP3), but the problem
remains
I take it you're seeing WinWord.exe in the Task Manager, then?
Do you see anything odd on these machines if you start Word "normally", or by
double-clicking on a document? (I'm wondering if there's an AutoExec macro
interfering, for example.)
If you modify your code to create a document, and you put a
newApp.Activate
command in there (try both before and after the Visible) does that make any
difference in the result?
How about starting Windows in Safe Mode?
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org
This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :-)
Cindy M.
2008-10-28 15:14:38 UTC
Permalink
Hi =?Utf-8?B?QmVu?=,
Post by Ben
I deleted the normal.dot and re-launched Word to make
sure there was nothing funny running on startup.
Not all things that can interfere are in Normal.dot.

Besides Doug's suggestion you also want to check what's in
the COM Add-ins dialog box. (If you can't find it in the
Tools menu, pull it out of Tools/Customize, Tools section.)
These are Add-ins registered in the HKCU. It's also
possible to have add-ins in the HKLM, but these won't
appear anywhere in Word. See here:
http://support.microsoft.com/default.aspx?scid=kb;en;307479


Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update
Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any
follow question or reply in the newsgroup and not by e-mail
:-)
Ben
2008-10-29 15:38:15 UTC
Permalink
Hi Cindy/Doug,

Thanks for the replies. I checked tools -> templates and add-ins, and also
the other places for any other add-ins, but there is nothing there. I may
re-image the machines to remedy this problem since it seems like it may take
more time to troubleshoot than it's worth. I'll probably do this next week,
but I am certainly open to any more suggestions in the mean time. I'll try
running process monitor to see if there's anything useful in the log. Thanks
again,
Post by Cindy M.
Hi =?Utf-8?B?QmVu?=,
Post by Ben
I deleted the normal.dot and re-launched Word to make
sure there was nothing funny running on startup.
Not all things that can interfere are in Normal.dot.
Besides Doug's suggestion you also want to check what's in
the COM Add-ins dialog box. (If you can't find it in the
Tools menu, pull it out of Tools/Customize, Tools section.)
These are Add-ins registered in the HKCU. It's also
possible to have add-ins in the HKLM, but these won't
http://support.microsoft.com/default.aspx?scid=kb;en;307479
Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update
Jun 17 2005)
http://www.word.mvps.org
This reply is posted in the Newsgroup; please post any
follow question or reply in the newsgroup and not by e-mail
:-)
Loading...