Skip to content

Instantly share code, notes, and snippets.

@shasso
shasso / Pub_Module1_SplitPages.bas
Last active January 3, 2025 17:49
Office 365 VBA Scripts
Sub ExportPagesToTextFilesUTF8()
Dim pubDoc As Document
Dim page As page
Dim outputFolder As String
Dim pageText As String
Dim filePath As String
Dim pageIndex As Integer
Dim startPageNumber As String
Dim currentPageNumber As Integer
Dim stream As Object ' ADODB.Stream