Hi there i am new to this forum and new to VBA as well. I have created a Word for that autofills using data from an excel table through mail merge to create multiple personalized letters all at once. I also found a code for Word VBA seen below that allows me to save each individual page from the resulting document as its own PDF but when it saves it names the files Page 1, Page 2. Etc. I would rather the code grab the file name from the same document as i can set the "rich text" content control to the applicable field that i want the file named as but i am not advanced enough to write the code to save each page as the text in that control field. Any help would be appreciated.

Sub SaveAsSeparatePDFs()
'UpdatebyExtendoffice20181120
Dim I As Long
Dim xDlg As FileDialog
Dim xFolder As Variant
Dim xStart, xEnd As Integer
On Error GoTo lbl
Set xDlg = Application.FileDialog(msoFileDialogFolderPicker)
If xDlg.Show <> -1 Then Exit Sub
xFolder = xDlg.SelectedItems(1)
xStart = CInt(InputBox("Start Page", "KuTools for Word"))
xEnd = CInt(InputBox("End Page:", "KuTools for Word"))
If xStart <= xEnd Then
For I = xStart To xEnd
ActiveDocument.ExportAsFixedFormat OutputFileName:= _
xFolder & "\Page_" & I & ".pdf", ExportFormat:=wdExportFormatPDF, _
OpenAfterExport:=False, OptimizeFor:=wdExportOptimizeForPrint, Range:= _
wdExportFromTo, From:=I, To:=I, Item:=wdExportDocumentContent, _
IncludeDocProps:=False, KeepIRM:=False, CreateBookmarks:= _
wdExportCreateHeadingBookmarks, DocStructureTags:=True, _
BitmapMissingFonts:=False, UseISO19005_1:=False
Next
End If
Exit Sub
lbl:
MsgBox "Enter right page number", vbInformation, "KuTools for Word"
End Sub