To save each serial letter into a single PDF, I use the following code:
--------
Sub Merge_To_Individual_Files()
'Merges one record at a time to the chosen output folder
[login to view URL] = False
Dim StrFolder As String, StrName As String, MainDoc As Document, i As Long, j As Long
Set MainDoc = ActiveDocument
With MainDoc
StrFolder = "C:\Users\Info\Downloads\"
For i = 1 To .[login to view URL]
With .MailMerge
.Destination = wdSendToNewDocument
.SuppressBlankLines = True
With .DataSource
.FirstRecord = i
.LastRecord = i
.ActiveRecord = i
If Trim(.DataFields("Az")) = "" Then Exit For
StrName = .DataFields("Az")
End With
.Execute Pause:=False
End With
StrName = Trim(StrName)
With ActiveDocument
.SaveAs2 FileName:=StrPath & StrName & ".docx", FileFormat:=wdFormatXMLDocument, AddToRecentFiles:=False
' and/or:
.SaveAs2 FileName:=StrPath & StrName & ".pdf", FileFormat:=wdFormatPDF, AddToRecentFiles:=False
.Close SaveChanges:=False
End With
Next i
End With
[login to view URL] = True
End Sub
---
Actually, the code runs quite fine, but the problem is that the serial print contains a dynamic picture via the INCLUDEPICTURE function.
Thus, it is required to update each newly created document before saving by the following code. Anybody who can help to ut it to the right place in the source text?
[login to view URL]
[login to view URL](Array("Gerade Verbindung mit Pfeil 3")). _
Select
[login to view URL]
Sir,
I am well versed in this kind of jobs and can do your project as per requirement.
I have over 8 years of experiences and will deliver flaw
I am very much able to work on this. ***I am ready to start
Waiting for further discussion
with thanks and regards
Dear Project Poster,
I have relevant hands on 5 years of experience .We have a team of all the skills. I assure you about the work quality and time delivery. Please give me chance to complete this project.
I had already done the same work in past. Looking forward to hear from you.
Let me give an opportunity to work. We can talk further when you message me.
Dear client,
I have a lot of experience with VBA and Excel.
Can you send me some example serial letter so I can try fixing the code?
Send me a message for more information.
Looking forward to work with u.
Kind regards,
SlenDATA
Hello Sir,
I am an expert VBA programmer and I should be able to help you on this. Though I would need to files to debug and fix the code as requested.
Thx
Aanvik
Highly responsible person
Eager to work & learn.
Good communication skills.
Proficient at automating Excel
Converting PDF to any text format.
I offer efficiency and high quality work.