0
我想用VBA創建一個包含帶有文檔評論頁面的新文檔。我只發現這個宏創建一個只列出評論的文檔。我需要評論頁面。如何修改它?提前致謝!如何使用頁面和註釋創建新的Word文檔?
Sub PrintOnlyComments()
Dim oThisDoc As Document
Dim oThatDoc As Document
Dim c As Comment
Dim sTemp As String
Dim iPage As Integer
Set oThisDoc = ActiveDocument
Set oThatDoc = Documents.Add
Application.ScreenUpdating = False
For Each c In oThisDoc.Comments
'Find page number of comment
oThisDoc.Select
c.Reference.Select
iPage = Selection.Information(wdActiveEndAdjustedPageNumber)
'Put info in new document
oThatDoc.Select
Selection.EndKey Unit:=wdStory
sTemp = "Page: " & iPage
Selection.TypeText Text:=sTemp
Selection.TypeParagraph
sTemp = "[" & c.Initial & c.Index & "] " & c.Range
Selection.TypeText Text:=sTemp
Selection.TypeParagraph
Next
Application.ScreenUpdating = True
End Sub
也許你想要一個模板? '.docm'擴展我的意思是.http://filext.com/file-extension/DOCM – SerCrAsH