View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Claus Busch Claus Busch is offline
external usenet poster
 
Posts: 3,872
Default Problems starting Word from Excel VBA

Hi Jan,

Am Thu, 3 Apr 2014 03:50:43 -0700 (PDT) schrieb :

It was made for Excel 2003, and now - after having upgraded to 2007 it does not work. If an instance of Word is already open, when I run the code, it Works as it is supposed, but if Word is not already started, it doesn't. So apparently the
Set Wdapp = CreateObject("Word.Application") par does not execute.


you have to open an existing document or to add a new document:

Set ObjWord = CreateObject("Word.Application")

With ObjWord
.Visible = True
' .documents.Open "E:\Excel_NG\Freigaben bei OneDrive.docx"
.documents.Add
End With


Regards
Claus B.
--
Vista Ultimate SP2 / Windows7 SP1
Office 2007 Ultimate SP3 / 2010 Professional