View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
[email protected] jan120253@gmail.com is offline
external usenet poster
 
Posts: 40
Default Problems starting Word from Excel VBA

Thank you. But why did it Work in 2003 then? Or is this a new thing?

Jan



Den torsdag den 3. april 2014 13.06.54 UTC+2 skrev Claus Busch:
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 Prof