View Single Post
 
Old 03-11-2017, 04:29 PM
Aurelius Aurelius is offline Windows 10 Office 2013
Novice
 
Join Date: Mar 2017
Posts: 2
Aurelius is on a distinguished road
Default Opening word document from excel 2013

Hi, I'd like to open a word document and export data to it. I used to be able to do this in Excel 2003 (having been away for a while). In Excel 2013 this is no longer possible.

This is / was my code:

Sub Rapport_Xl_to_Word()

Dim Navn1, Navn2 As String
Dim dato As Date
'Dim wordapp As New Word.Application

Set wordapp = CreateObject("Word.Application")

'dato = Format(Now, "dd-mm-yyyy")

With wordapp
.Visible = True
.Documents.Open Filename:="C:\Desktop\Økonomirapport.docx"
..........

End With
End Sub

Where is the problem?
Thanks for any help provided!
Reply With Quote