D
David Howdon
What I wanted to create was a macro that went through each comment in
the document and presented it to the user in a dialogue box. If the
user clicked yes the name and initials of the comment should be changed
to some entered by the user at an earlier stage. Basically to be used
when one person has typed two peoples comments into a document.
SO I wrote the VBA code
Sub DeltaComment()
Dim oCmt As Comment
Dim newinit As String
Dim newname As String
newinit = InputBox("Enter Initials for updated comments", "Enter
Initials")
newname = InputBox("Enter Name for updated comments", "Enter Name")
For Each oCmt In ActiveDocument.Comments
If MsgBox(oCmt.Range, vbYesNo) = vbYes Then
oCmt.Initial = newinit
oCmt.Author = newname
End If
Next oCmt
End Sub
which I thought would work. However what that if I clicked yes it
changed the details of every comment.
I've probably made some really dumb mistake but cannot spot it. Any
help appreciated.
Thanks
the document and presented it to the user in a dialogue box. If the
user clicked yes the name and initials of the comment should be changed
to some entered by the user at an earlier stage. Basically to be used
when one person has typed two peoples comments into a document.
SO I wrote the VBA code
Sub DeltaComment()
Dim oCmt As Comment
Dim newinit As String
Dim newname As String
newinit = InputBox("Enter Initials for updated comments", "Enter
Initials")
newname = InputBox("Enter Name for updated comments", "Enter Name")
For Each oCmt In ActiveDocument.Comments
If MsgBox(oCmt.Range, vbYesNo) = vbYes Then
oCmt.Initial = newinit
oCmt.Author = newname
End If
Next oCmt
End Sub
which I thought would work. However what that if I clicked yes it
changed the details of every comment.
I've probably made some really dumb mistake but cannot spot it. Any
help appreciated.
Thanks