0
試圖編寫一個函數來刪除Word文檔中的空白頁。沒有被刪除。我很感激,如果有人可以看看。用VBA刪除Word文檔中的空白頁
Public Function DeleteBlankPages(wd As Word.Document, wdApp As Word.Application)
Dim par As Paragraph
For Each par In wd.Paragraphs
If IsEmpty(par.Range.Text) Then
par.Range.Select
wdApp.Selection.Delete
End If
Next par
End Function
您是否嘗試過通過線與調試行執行呢? – litelite