Ik maak vanuit MS Word middels een makro in het basis bestand voor afdruk samenvoegen een serie pdf bestanden. De makro ziet er als volgt uit:
Sub afzonderlijk2()
'
' Afzonderlijk2 zet basisbestand dat gekoppeld is aan excel voor mailmerge op in afzonderlijke pdf bestanden
' De basis, dus niet het al grote aaneengeschakelde bestand, gebruiken voor de macro
'
If ActiveDocument.MailMerge.MainDocumentType <> wdNotAMergeDocument Then
With ActiveDocument.MailMerge
.ViewMailMergeFieldCodes = False
With .DataSource
.ActiveRecord = wdLastRecord
y = .ActiveRecord
.ActiveRecord = wdFirstRecord
For j = 1 To y
ActiveDocument.ExportAsFixedFormat OutputFileName:= _
"D:\" & .DataFields(2).Value & " " & Date & ".pdf", _
ExportFormat:=wdExportFormatPDF, OpenAfterExport:=False, OptimizeFor:= _
wdExportOptimizeForPrint, Range:=wdExportAllDocument, From:=1, To:=1, _
Item:=wdExportDocumentContent, IncludeDocProps:=True, KeepIRM:=True, _
CreateBookmarks:=wdExportCreateNoBookmarks, DocStructureTags:=True, _
BitmapMissingFonts:=True, UseISO19005_1:=False
If j < y Then .ActiveRecord = wdNextRecord
Next
End With
End With
End If
End Sub
Deze makro wil ik uitbreiden zodat het pdf bestand ook nog verstuurd wordt naar het bijbehorende emailadres. Wie kan mij daarmee helpen?
Alvast dank,
will1414
Sub afzonderlijk2()
'
' Afzonderlijk2 zet basisbestand dat gekoppeld is aan excel voor mailmerge op in afzonderlijke pdf bestanden
' De basis, dus niet het al grote aaneengeschakelde bestand, gebruiken voor de macro
'
If ActiveDocument.MailMerge.MainDocumentType <> wdNotAMergeDocument Then
With ActiveDocument.MailMerge
.ViewMailMergeFieldCodes = False
With .DataSource
.ActiveRecord = wdLastRecord
y = .ActiveRecord
.ActiveRecord = wdFirstRecord
For j = 1 To y
ActiveDocument.ExportAsFixedFormat OutputFileName:= _
"D:\" & .DataFields(2).Value & " " & Date & ".pdf", _
ExportFormat:=wdExportFormatPDF, OpenAfterExport:=False, OptimizeFor:= _
wdExportOptimizeForPrint, Range:=wdExportAllDocument, From:=1, To:=1, _
Item:=wdExportDocumentContent, IncludeDocProps:=True, KeepIRM:=True, _
CreateBookmarks:=wdExportCreateNoBookmarks, DocStructureTags:=True, _
BitmapMissingFonts:=True, UseISO19005_1:=False
If j < y Then .ActiveRecord = wdNextRecord
Next
End With
End With
End If
End Sub
Deze makro wil ik uitbreiden zodat het pdf bestand ook nog verstuurd wordt naar het bijbehorende emailadres. Wie kan mij daarmee helpen?
Alvast dank,
will1414