lukke applikaaation
hvordan lukker jeg word helt ned i flg. excelmacroSub WordNat()
Worksheets("dataark").Range("b11:g100").Copy
filnavn = Worksheets("dataark").Range("A11").Value
Dim y As Word.Application
Set y = CreateObject("Word.application")
With y
.Visible = True
.documents.Open Filename:="C:\logfiler\rapporter\test.doc"
.Selection.Paste
Application.Wait (Now + TimeValue("0:00:10"))
ActiveDocument.SaveAs Filename:="c:\logfiler\Rapporter\Nat " & filnavn & ".doc"
ActiveDocument.Close
Application.CutCopyMode = False
End With
End Sub
