Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
JD2 JD2 is offline
external usenet poster
 
Posts: 25
Default Copying comments between documents

Hi Word Gurus,

Is there an easy way to copy all the comments in one Word document to
another Word document using Word 2007 (or Word 2003 if necessary)?

Kind Regards
JD2
  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Copying comments between documents

You need a macro to copy from the current document to another e.g..

Sub ExtractComments()
Dim sDoc As Document
Dim tDoc As Document
Dim sLine As Integer
Dim sPage As Integer
Set sDoc = ActiveDocument
Set tDoc = Documents.Add
With sDoc
For i = 1 To .Comments.Count
.Comments(i).Reference.Select
sPage = Selection.Information(wdActiveEndPageNumber)
sLine = Selection.Information(wdFirstCharacterLineNumber)
If i = 1 Then
tDoc.Range.InsertAfter .Comments(i).Range.Text
Else
tDoc.Range.InsertAfter vbCr & .Comments(i).Range.Text
End If
tDoc.Range.InsertAfter " - Page " & _
sPage & ", Line " & sLine
Next i
End With
tDoc.Activate
End Sub

http://www.gmayor.com/installing_macro.htm
--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



JD2 wrote:
Hi Word Gurus,

Is there an easy way to copy all the comments in one Word document to
another Word document using Word 2007 (or Word 2003 if necessary)?

Kind Regards
JD2



  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Copying comments between documents

If by "copy", you actually mean extract, then running a macro that contains
the following code when the document
containing the comments is the active document will create a new document
containing a table with the comments, the page number on which they appear
and the author's name:

Dim Source As Document, Target As Document
Dim TTable As Table
Dim TRow As Row
Dim acomment As Comment
Set Source = ActiveDocument
Set Target = Documents.Add
Set TTable = Target.Tables.Add(Target.Range, 1, 3)
With TTable.Rows(1)
.Cells(1).Range.Text = "Comment"
.Cells(2).Range.Text = "Page Number"
.Cells(3).Range.Text = "Author"
End With
For Each acomment In Source.Comments
Set TRow = TTable.Rows.Add
TRow.Cells(1).Range.Text = acomment.Range
acomment.Range.Select
TRow.Cells(2).Range.Text = Selection.Information(wdActiveEndPageNumber)
TRow.Cells(3).Range.Text = acomment.Author
Next acomment


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
"JD2" wrote in message
...
Hi Word Gurus,

Is there an easy way to copy all the comments in one Word document to
another Word document using Word 2007 (or Word 2003 if necessary)?

Kind Regards
JD2


Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
copying comments Havelock12 Microsoft Word Help 2 September 5th 08 02:06 PM
Copying styles between documents Ness T Microsoft Word Help 2 June 22nd 07 09:42 PM
Copying documents that contain hyperlinks Redphipps Microsoft Word Help 1 March 29th 07 02:32 AM
Ignore styles while copying between documents jp Page Layout 7 February 4th 05 12:01 AM
Copying sub-documents into a new folder Dave Formatting Long Documents 3 January 29th 05 04:06 PM


All times are GMT +1. The time now is 12:04 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"