I am also having very similar issue, I am dividing a large word document by sections and saving each section individually as a pdf file. I need to compile the name for the PDF using the first line of the section. The code I have so far is this:
Sub BreakOnSection()
' Used to set criteria for moving through the document by section.
Application.Browser.Target = wdBrowseSection
'A mailmerge documents ends with a section break next page.
'Subtracting one from the section count stop error message.
For i = 1 To ((ActiveDocument.Sections.Count) - 1)
'Select and copy the section text to the clipboard
ActiveDocument.Bookmarks("\Section").Range.Copy
'Create a new document to paste text from clipboard.
Documents.Add
Selection.Paste
' Removes the break that is copied at the end of the section, if any.
Selection.MoveUp Unit:=wdLine, Count:=1, Extend:=wdExtend
Selection.Delete Unit:=wdCharacter, Count:=1
ChangeFileOpenDirectory "C:\Documents and Settings\vadim\My Documents\INVAR Technologies\Clients\Gventer"
DocNum = DocNum + 1
ActiveDocument.ExportAsFixedFormat OutputFileName:= _
FirstPara & DocNum & ".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
ActiveDocument.Close SaveChanges:=False
' Move the selection to the next section in the document
Application.Browser.Next
Next i
ActiveDocument.Close SaveChanges:=wdDoNotSaveChanges
End Sub
The header of each section in the big document look like this:
"Note for Sofia Kogan on 5/10/2010"
How can I make that into a file name? The date format will probably have to be restructured as file names in windows can't have "/".
Any help would be greatly appreciate it.