Sub
Dokument_Erstellen()
Dim
wordapp
As
New
Word.Application
Dim
doc
As
Word.Document
wordapp.Visible =
True
Set
doc = wordapp.Documents.Open(
"C:\User\Dokument.docx"
)
doc.Bookmarks(
"Kunde"
).Range.Text = Übersicht.Range(
"B8"
).Value
doc.Bookmarks(
"Telefon"
).Range.Text = Übersicht.Range(
"J8"
).Value
<strong>
doc.fields.update</strong>
doc.ExportAsFixedFormat ThisWorkbook.Path &
"\Dokument"
&
".pdf"
, wdExportFormatPDF
doc.Close SaveChanges:=
False
wordapp.Quit
End
Sub