View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson Chip Pearson is offline
external usenet poster
 
Posts: 7,247
Default Why this don't work

ActivateMicrosoftApp does not return a reference to the activated
application. Instead, use GetObject.

Set appWd = GetObject(,"Word.Application")


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com



"Fernando Ortiz" wrote in message
...
Hi Excel Experts:

Why this code don`t work, I already create a reference to the
Word type
library

Sub WordControl()
Dim appWd As Word.Application
'line of error
Set appWd = Application.ActivateMicrosoftApp xlMicrosoftWord
...More lines of code
appWd.Quit
End Sub

Win XP pro, Excel 2002

Thanks for any advice

Regards

Fernando Ortiz