Dear all,

I try to open word document throught VBA from Excel, but after running the system writes to me "Run-time error 2146959355 (80080005)".

I need copy data from excel to word, but system can't open the word document.

Please help me with this problem.

Thank you

Viktor




This my part of my code:


Dim ws As Worksheet, msWord As Object

Set ws = ActiveSheet
Set msWord = CreateObject("Word.Application")

With msWord
.Visible = True
.Documents.Open ThisWorkbook.Path & "~/Desktop/! Rezervační smlouva - vzor.docx"
.Activate

'Zájemce
With .ActiveDocument.Content.Find
.Text = "<<zájemce>>"
.Replacement.Text = ws.Range("B1").Value

.Execute Replace:=2
End With

End With