I want to thank you Harold. I used your technique recently to code around 40 long transcripts for a project in Afghanistan. It worked without a hitch and saved me a lot of money and time learning a new software. Simple and efficient. I would highly recommend. Cheers
This is super helpful and works really well. For anyone wondering why your word document does not have 'extract command' in macros you need to modify your document by downloading the free add-in suggested in the authors description box. Thank you for the instruction it really has helped.
Dear Dr. Peach, thank you very much for your video. It helps me to save time and internet data to code data without spend times for learn and spend too much internet data for new analysis software. From hundred videos about coding data on youtube, I fastly understand yours. Thank you!
Dr. Peach, THANK YOU! I have OS X Word 2011. The initial install didn't work, however I was able to cut/paste the macro from the website, then tweak it for my table column headings. Watching your workflow was been very helpful to me and a few of my classmates.
Thank you so much! Although I was worried about downloading your Word Macro, it all worked! I followed your video exactly. I have office 365 and this helped me code and sort and do all that I needed for my dissertation!
Thanks Harold! I would LOVE to know if I could code my Themes in the Comments area in a way that - after extracting them into a table - would put the categories across the top and the variables down the left side? As a very low-tech user, I can just manage to create graphs from tables in Word, but I can't get my codes into the tables automatically (only manually). If you know how I could use commas or paragraph markers etc. to automatically place my Comments in the right parts of table, it would let me stay in Word for all my coding and graph production.
Is there a way to set word references like in Excel. For Example, I have a Template which uses text to describe things, like a movie title, number of theaters, and P&A Budget. Like this: "Galaxia will be released in 500 theaters with a P&A Budget of $500.00 per theater." Is there a way (without find and replace) to use a code for each, i.e. MovieTitle, NumTheaters, P&ABudget and insert the code words into the text so that wherever the code word appears, it will insert the text value of the code word? This way, I can simply change the value of the code word and all entries in the document will update automatically.
Hi Dr. Harold. Thanks for sharing the videos. Just wanna ask you how to extract comments to macro? I watched your video (Coding Text Using Microsoft Word) but I couldn't do it when I do in my file. Could you help me with this?
what would be considered small scale? I have 11 interviews and I bought Nvivo but short on time to learn the software right now for my pilot data. I'm thinking I will need to learn it later when I get my actual data.
Hi Harold great tutorial, as I am a novice to coding transcripts. I have got the macro working on my mac but for some reason it doesn't extract the textual data that I have selected for the comment. Did you make a change to the macro to include this?
Hi, Dr. Peach - thank you so much for posting this video and sharing the link to the macro. Quick question - when I review the macro code, I do not see the "line number" in with the location (page number). Can you help? I get to do multiple layers of coding for my Capstone Project and it would be really helpful. Thank you!
Hi, Harold, My Word couldn't run the macro. I create the name for the macro as 'ExtractCommentsToNewDoc', and then I click 'Run', but no new doc. was created. Could you help me?
hi i found that we have to "build" a new macro at the first time. This website can help us. www.thedoctools.com/word-macros-tips/word-macros/extract-comments-to-new-document/ It already have the ''extract macro" code. (www.thedoctools.com/downloads/basComments_Extract.htm We can just copy and paste the code when we start this new macro. Many thanks to this website.
hello Harold have just worked it out using doc tools. but my extracted data is page numbers. can't change it any other way how can i do this? even when i put line numbers in original document it still only extracts to show page numbers. please advice
Hello, Wonderful video, but i couldn't execute it because i didn't have the right macro. do you have a special macro for the extraction of the comments? Thanks
What version are you using in presentation? I followed but once I macros it there was no file in it feature. What can I do? Your presentation is really helpful for my career.
Dear Dr. Harold, thank you very much for this video. I have been struggling with but you have come to my rescue.Please, do you have a video on how to use the Nvivo?
Hi guys I did comments and tries use macros to extract comments in new doc. New doc is not creating. Can anyone help me? Read all comments tried but not work? any advice ?
So if you want to make an excel sheet with page number, line number, author, time comment was made, comment and reference text you can use this : Sub ExportComments() ' Note: A reference to the Microsoft Excel # Object Library is required, set via Tools|References in the Word VBE. Dim StrCmt As String, StrTmp As String, i As Long, j As Long, xlApp As Object, xlWkBk As Object StrCmt = "Page,Line,Author,Date & Time,Comment,Reference Text" StrCmt = Replace(StrCmt, ",", vbTab) With ActiveDocument ' Process the Comments For i = 1 To .Comments.Count With .Comments(i) StrCmt = StrCmt & vbCr & .Reference.Information(wdActiveEndAdjustedPageNumber) & vbTab StrCmt = StrCmt & .Reference.Information(wdFirstCharacterLineNumber) & vbTab & .Author & vbTab StrCmt = StrCmt & .Date & vbTab & Replace(Replace(.Range.Text, vbTab, ""), vbCr, "") StrCmt = StrCmt & vbTab & Replace(Replace(.Reference.Text, vbTab, ""), vbCr, "") End With Next End With ' Test whether Excel is already running. On Error Resume Next Set xlApp = GetObject(, "Excel.Application") 'Start Excel if it isn't running If xlApp Is Nothing Then Set xlApp = CreateObject("Excel.Application") If xlApp Is Nothing Then MsgBox "Can't start Excel.", vbExclamation Exit Sub End If End If On Error GoTo 0 With xlApp Set xlWkBk = .Workbooks.Add ' Update the workbook. With xlWkBk.Worksheets(1) For i = 0 To UBound(Split(StrCmt, vbCr)) StrTmp = Split(StrCmt, vbCr)(i) For j = 0 To UBound(Split(StrTmp, vbTab)) .Cells(i + 1, j + 1).Value = Split(StrTmp, vbTab)(j) Next Next .Columns("A:D").AutoFit End With ' Tell the user we're done. MsgBox "Workbook updates finished.", vbOKOnly ' Switch to the Excel workbook .Visible = True End With ' Release object memory Set xlWkBk = Nothing: Set xlApp = Nothing End Sub
+Patrick Kaeslin unfortunately the code was written by someone else (see above). I only modified the code. For this reason, I do not have permission to post the code. Sorry.
+Harold Peach thank you very much for your reply. As you mentoined to Dionne " 'Line number .Cells(2).Range.Text = oDoc.Comments(n).Scope.Information(wdFirstCharacterLineNumber)" that something I was looking for. Thanks again!
Patrick, where should the modification be made? I tried using the Edit feature and added the line above but it didn't work. Appreciate your guidance. Thanks.
Hello Koos. I modified the macro to include the line number and retain the comments section. The original code only had five columns created so a sixth column must be created to allow for the line number to be added. Below after the *** is the modified macro with line number AND comments. *** Public Sub ExtractCommentsToNewDoc() '========================= 'Macro created 2007 by Lene Fredborg, DocTools - www.thedoctools.com 'Revised October 2013 by Lene Fredborg: Date column added to extract 'THIS MACRO IS COPYRIGHT. YOU ARE WELCOME TO USE THE MACRO BUT YOU MUST KEEP THE LINE ABOVE. 'YOU ARE NOT ALLOWED TO PUBLISH THE MACRO AS YOUR OWN, IN WHOLE OR IN PART. '========================= 'The macro creates a new document 'and extracts all comments from the active document 'incl. metadata 'Minor adjustments are made to the styles used 'You may need to change the style settings and table layout to fit your needs '========================= Dim oDoc As Document Dim oNewDoc As Document Dim oTable As Table Dim nCount As Long Dim n As Long Dim Title As String Title = "Extract All Comments to New Document" Set oDoc = ActiveDocument nCount = ActiveDocument.Comments.Count If nCount = 0 Then MsgBox "The active document contains no comments.", vbOKOnly, Title GoTo ExitHere Else 'Stop if user does not click Yes If MsgBox("Do you want to extract all comments to a new document?", _ vbYesNo + vbQuestion, Title) vbYes Then GoTo ExitHere End If End If Application.ScreenUpdating = False 'Create a new document for the comments, base on Normal.dotm Set oNewDoc = Documents.Add 'Set to landscape oNewDoc.PageSetup.Orientation = wdOrientLandscape 'Insert a 6-column table for the comments With oNewDoc .Content = "" Set oTable = .Tables.Add _ (Range:=Selection.Range, _ NumRows:=nCount + 1, _ NumColumns:=6) End With 'Insert info in header - change date format as you wish oNewDoc.Sections(1).Headers(wdHeaderFooterPrimary).Range.Text = _ "Comments extracted from: " & oDoc.FullName & vbCr & _ "Created by: " & Application.UserName & vbCr & _ "Creation date: " & Format(Date, "MMMM d, yyyy") 'Adjust the Normal style and Header style With oNewDoc.Styles(wdStyleNormal) .Font.Name = "Arial" .Font.Size = 10 .ParagraphFormat.LeftIndent = 0 .ParagraphFormat.SpaceAfter = 6 End With With oNewDoc.Styles(wdStyleHeader) .Font.Size = 8 .ParagraphFormat.SpaceAfter = 0 End With 'Format the table appropriately With oTable .Range.Style = wdStyleNormal .AllowAutoFit = False .PreferredWidthType = wdPreferredWidthPercent .PreferredWidth = 100 .Columns.PreferredWidthType = wdPreferredWidthPercent .Columns(1).PreferredWidth = 5 .Columns(2).PreferredWidth = 5 .Columns(3).PreferredWidth = 20 .Columns(4).PreferredWidth = 40 .Columns(5).PreferredWidth = 18 .Columns(6).PreferredWidth = 12 .Rows(1).HeadingFormat = True End With 'Insert table headings With oTable.Rows(1) .Range.Font.Bold = True .Cells(1).Range.Text = "Page" .Cells(2).Range.Text = "Line" .Cells(3).Range.Text = "Comment scope" .Cells(4).Range.Text = "Comment text" .Cells(5).Range.Text = "Author" .Cells(6).Range.Text = "Date" End With 'Get info from each comment from oDoc and insert in table For n = 1 To nCount With oTable.Rows(n + 1) 'Page number .Cells(1).Range.Text = oDoc.Comments(n).Scope.Information(wdActiveEndPageNumber) 'Line number .Cells(2).Range.Text = oDoc.Comments(n).Scope.Information(wdFirstCharacterLineNumber) 'The text marked by the comment .Cells(3).Range.Text = oDoc.Comments(n).Scope 'The comment itself .Cells(4).Range.Text = oDoc.Comments(n).Range.Text 'The comment author .Cells(5).Range.Text = oDoc.Comments(n).Author 'The comment date in format dd-MMM-yyyy .Cells(6).Range.Text = Format(oDoc.Comments(n).Date, "dd-MMM-yyyy") End With Next n Application.ScreenUpdating = True Application.ScreenRefresh oNewDoc.Activate MsgBox nCount & " comments found. Finished creating comments document.", vbOKOnly, Title ExitHere: Set oDoc = Nothing Set oNewDoc = Nothing Set oTable = Nothing End Sub
Hello, I have a problem :( using word 2011 for mac, when I want to run the macro on my document it gives me an error : Compile error in hidden module: DED_ExtractComments what should I do??
hello harold i am not good with computers. but i think someone has posted a code in comments. i have transcribed my interview and coded with comments as advised . i need to extract the comments from my word document into a new document. can you advise me step by step how to do this. i would be very grateful. thank you
in the description of the video the Dr harold add a link you need check it there is the code of the macro and how you embeed it in Word, i happend the same that you but Jorge Roa discovered the trick.
Dr Harold, where should the modification be made? I tried using the Edit feature and added the line above but it didn't work. Appreciate your guidance. Thanks.
Hello Harold! I'm currently going through the same productive struggle as Samantha. Can you tell me where exactly I have to add 'Line number .Cells(2).Range.Text = oDoc.Comments(n).Scope.Information(wdFirstCharacterLineNumber)? This is such a great resource! I'm was feeling overwhelmed with my mixed methods data analysis. I'll be sharing this gem of knowledge with my classmates. Thank you!!!
+Harold Peach, thank you for the video! Super helpful. But can you or anyone tell us where to enter this? 'Line number .Cells(2).Range.Text = oDoc.Comments(n).Scope.Information(wdFirstCharacterLineNumber)
why you didnt explain the first part of how use the macro in MS will be more easy , my friend Collins couldnt sleep last night trying to understand the tutorial
Hi, WHO CAN HELP to implement and use this macro in WORD for MAC 2011. Unfortunately I am not experienced in working with macros... Thank you very much in advance !!!!
Camila can you advise me step by step how did you do this not good with computers. i have transcribed my interview, coded with comments but need to extract the comments on a separate word document. please help
hi i find this video very useful. Thank you for uploading. but i am unable to use this feature in my Document. does it require any macro to download. i have no clue. kindly help
Yogesh S Atray Yes, See the description above for a link to the original macro. You will need to add this macro to your Word document and modify it to meet your specific needs.
Well after an extensive amount of trial and error, I finally figure out the case of adding "line number". To include the line number just simply replace the 'author' line code with this code since I find it irrelevant to have such column on that; 'Line number .Cells(4).Range.Text = oDoc.Comments(n).Scope.Information(wdFirstCharacterLineNumber) please be reminded to edit (.Cells(4).Range.Text = "Author") in the insert heading section and change "author" to "line number" otherwise your "author" column will not change to "line number". I hope this helps.
I want to thank you Harold. I used your technique recently to code around 40 long transcripts for a project in Afghanistan. It worked without a hitch and saved me a lot of money and time learning a new software. Simple and efficient. I would highly recommend. Cheers
This is super helpful and works really well. For anyone wondering why your word document does not have 'extract command' in macros you need to modify your document by downloading the free add-in suggested in the authors description box. Thank you for the instruction it really has helped.
Dear Dr. Peach, thank you very much for your video. It helps me to save time and internet data to code data without spend times for learn and spend too much internet data for new analysis software. From hundred videos about coding data on youtube, I fastly understand yours. Thank you!
5 years later and still so useful
So far the best video on this topic.
Dr. Peach, THANK YOU! I have OS X Word 2011. The initial install didn't work, however I was able to cut/paste the macro from the website, then tweak it for my table column headings. Watching your workflow was been very helpful to me and a few of my classmates.
Do yu have the macro for Lines & Page Nos.? Would you like to share it?
Very informative Dr. Harold. I am looking for a video like this that is easy to understand.
How did you edit your macro so that the line number is displayed with the page number, in the table?
Fantastic! It still works (MSOffice 2016). Thanks a lot!
Literally saved my dissertation. Thank you
just use latex
Thanks, mate. U save time, pain, and is just beautiful, Harold
It was a very informative video. Thank you.
Thank you for the tutorial and the provided link. I found your explanation and instructions very useful.
Thank you for this. Very helpful
Thank you!! This is very useful and will be helping us with our Bachelors project
Dr Harold. Thank you so much for this video. It actually helped me tremendously in conducting my research thesis.
This video is super!!! It solved the problem with the too many codes I have! Thanks a lot!
Thank you so much! Although I was worried about downloading your Word Macro, it all worked! I followed your video exactly. I have office 365 and this helped me code and sort and do all that I needed for my dissertation!
I have not personally tested this, but I believe it works in Word 2010 for the Mac, but not in earlier versions.
Thanks Harold! I would LOVE to know if I could code my Themes in the Comments area in a way that - after extracting them into a table - would put the categories across the top and the variables down the left side? As a very low-tech user, I can just manage to create graphs from tables in Word, but I can't get my codes into the tables automatically (only manually). If you know how I could use commas or paragraph markers etc. to automatically place my Comments in the right parts of table, it would let me stay in Word for all my coding and graph production.
This is so helpful! Does anyone know, is it possible to do this same thing in Google Docs?
Thank you this is very helpful
Is there a way to set word references like in Excel. For Example, I have a Template which uses text to describe things, like a movie title, number of theaters, and P&A Budget. Like this: "Galaxia will be released in 500 theaters with a P&A Budget of $500.00 per theater." Is there a way (without find and replace) to use a code for each, i.e. MovieTitle, NumTheaters, P&ABudget and insert the code words into the text so that wherever the code word appears, it will insert the text value of the code word? This way, I can simply change the value of the code word and all entries in the document will update automatically.
Hi Dr. Harold. Thanks for sharing the videos. Just wanna ask you how to extract comments to macro? I watched your video (Coding Text Using Microsoft Word) but I couldn't do it when I do in my file. Could you help me with this?
Thank you so much for this. Helped me in my hour of need
what would be considered small scale? I have 11 interviews and I bought Nvivo but short on time to learn the software right now for my pilot data. I'm thinking I will need to learn it later when I get my actual data.
What classifies as small scale research? Would 15-20 interviews be considered large-scale?
Hi Harold great tutorial, as I am a novice to coding transcripts. I have got the macro working on my mac but for some reason it doesn't extract the textual data that I have selected for the comment.
Did you make a change to the macro to include this?
Brilliant help. It won't let me run though?
enjoyed your lecture! thank you
the version on the doctools.com does not have the code for line number. Is there a way to add it easily?
I had the same problem
Could you explain how you coded your macro?
Great for expert interviews with a small sample size like mine (N = 20). Thank you so much for sharing.
After clicking on run, the window "do you want to extract comments to new document?" does not appear. Anyone who can help please
Hi, Dr. Peach - thank you so much for posting this video and sharing the link to the macro. Quick question - when I review the macro code, I do not see the "line number" in with the location (page number). Can you help? I get to do multiple layers of coding for my Capstone Project and it would be really helpful. Thank you!
Great ... very helpful
Thank U very much
Why can't I see all the macros in the macros name option? How can I make it to be active?
Thank you very much for the tool Mr. Peach! Very very useful!
Its a good technique for content analysis. Do you think this technique can be used for PhD projects?
Thank you very much sir.
Dr Harold, thanks so much for this video. It worked! God bless you real good.
Thank you Harold. That was so helpful.
How do you get the line number in the new document? For me it is only showing the page number.
Here too, everything else worked perfectly , would be great to get a hint to get the line numbers into the extracted document. Thanks for sharing !
How to get the coding microsoft words tempplate? help me
Thank you. I've found the information very useful.
Very useful tool there. =) Life saver for my upcoming qualitative assignment.
Hi, Harold, My Word couldn't run the macro. I create the name for the macro as 'ExtractCommentsToNewDoc', and then I click 'Run', but no new doc. was created. Could you help me?
I experienced the same problem.
hi
i found that we have to "build" a new macro at the first time.
This website can help us. www.thedoctools.com/word-macros-tips/word-macros/extract-comments-to-new-document/
It already have the ''extract macro" code. (www.thedoctools.com/downloads/basComments_Extract.htm
We can just copy and paste the code when we start this new macro.
Many thanks to this website.
@@游捷-r3x that really helps! thank you so much for sharing this!
Hello Harold, Thank You so much. That was 100% helpful to me.God Bless You
OMG, thank you.
hello Harold have just worked it out using doc tools. but my extracted data is page numbers. can't change it any other way how can i do this? even when i put line numbers in original document it still only extracts to show page numbers. please advice
Where can I get the macro from and how do I use??
This is an excellent video and i have read the comments below and I used to write code for computers however, I am lost. Can you help?
Hello,
Wonderful video, but i couldn't execute it because i didn't have the right macro. do you have a special macro for the extraction of the comments?
Thanks
What version are you using in presentation? I followed but once I macros it there was no file in it feature. What can I do? Your presentation is really helpful for my career.
Dear Dr. Harold, thank you very much for this video. I have been struggling with but you have come to my rescue.Please, do you have a video on how to use the Nvivo?
Hi guys
I did comments and tries use macros to extract comments in new doc. New doc is not creating. Can anyone help me? Read all comments tried but not work? any advice ?
Thank you sir
So if you want to make an excel sheet with page number, line number, author, time comment was made, comment and reference text you can use this :
Sub ExportComments()
' Note: A reference to the Microsoft Excel # Object Library is required, set via Tools|References in the Word VBE.
Dim StrCmt As String, StrTmp As String, i As Long, j As Long, xlApp As Object, xlWkBk As Object
StrCmt = "Page,Line,Author,Date & Time,Comment,Reference Text"
StrCmt = Replace(StrCmt, ",", vbTab)
With ActiveDocument
' Process the Comments
For i = 1 To .Comments.Count
With .Comments(i)
StrCmt = StrCmt & vbCr & .Reference.Information(wdActiveEndAdjustedPageNumber) & vbTab
StrCmt = StrCmt & .Reference.Information(wdFirstCharacterLineNumber) & vbTab & .Author & vbTab
StrCmt = StrCmt & .Date & vbTab & Replace(Replace(.Range.Text, vbTab, ""), vbCr, "")
StrCmt = StrCmt & vbTab & Replace(Replace(.Reference.Text, vbTab, ""), vbCr, "")
End With
Next
End With
' Test whether Excel is already running.
On Error Resume Next
Set xlApp = GetObject(, "Excel.Application")
'Start Excel if it isn't running
If xlApp Is Nothing Then
Set xlApp = CreateObject("Excel.Application")
If xlApp Is Nothing Then
MsgBox "Can't start Excel.", vbExclamation
Exit Sub
End If
End If
On Error GoTo 0
With xlApp
Set xlWkBk = .Workbooks.Add
' Update the workbook.
With xlWkBk.Worksheets(1)
For i = 0 To UBound(Split(StrCmt, vbCr))
StrTmp = Split(StrCmt, vbCr)(i)
For j = 0 To UBound(Split(StrTmp, vbTab))
.Cells(i + 1, j + 1).Value = Split(StrTmp, vbTab)(j)
Next
Next
.Columns("A:D").AutoFit
End With
' Tell the user we're done.
MsgBox "Workbook updates finished.", vbOKOnly
' Switch to the Excel workbook
.Visible = True
End With
' Release object memory
Set xlWkBk = Nothing: Set xlApp = Nothing
End Sub
2024 I am here !
hello... please, can coding be also called categorizing???
this is a useful macro - does anyone know how to add a page number in the footer of the new document? thanks
Do you give online private classes?
Hi Harold, this is a great presentation of coding. Would you mind to present your modified version of this word macro? Thanks in advance.
+Patrick Kaeslin unfortunately the code was written by someone else (see above). I only modified the code. For this reason, I do not have permission to post the code. Sorry.
+Harold Peach thank you very much for your reply. As you mentoined to Dionne " 'Line number
.Cells(2).Range.Text = oDoc.Comments(n).Scope.Information(wdFirstCharacterLineNumber)" that something I was looking for. Thanks again!
Patrick, where should the modification be made? I tried using the Edit feature and added the line above but it didn't work. Appreciate your guidance. Thanks.
When I perform this modification, the line number appears (great) but the comments disappears.
Hello Koos. I modified the macro to include the line number and retain the comments section. The original code only had five columns created so a sixth column must be created to allow for the line number to be added.
Below after the *** is the modified macro with line number AND comments.
***
Public Sub ExtractCommentsToNewDoc()
'=========================
'Macro created 2007 by Lene Fredborg, DocTools - www.thedoctools.com
'Revised October 2013 by Lene Fredborg: Date column added to extract
'THIS MACRO IS COPYRIGHT. YOU ARE WELCOME TO USE THE MACRO BUT YOU MUST KEEP THE LINE ABOVE.
'YOU ARE NOT ALLOWED TO PUBLISH THE MACRO AS YOUR OWN, IN WHOLE OR IN PART.
'=========================
'The macro creates a new document
'and extracts all comments from the active document
'incl. metadata
'Minor adjustments are made to the styles used
'You may need to change the style settings and table layout to fit your needs
'=========================
Dim oDoc As Document
Dim oNewDoc As Document
Dim oTable As Table
Dim nCount As Long
Dim n As Long
Dim Title As String
Title = "Extract All Comments to New Document"
Set oDoc = ActiveDocument
nCount = ActiveDocument.Comments.Count
If nCount = 0 Then
MsgBox "The active document contains no comments.", vbOKOnly, Title
GoTo ExitHere
Else
'Stop if user does not click Yes
If MsgBox("Do you want to extract all comments to a new document?", _
vbYesNo + vbQuestion, Title) vbYes Then
GoTo ExitHere
End If
End If
Application.ScreenUpdating = False
'Create a new document for the comments, base on Normal.dotm
Set oNewDoc = Documents.Add
'Set to landscape
oNewDoc.PageSetup.Orientation = wdOrientLandscape
'Insert a 6-column table for the comments
With oNewDoc
.Content = ""
Set oTable = .Tables.Add _
(Range:=Selection.Range, _
NumRows:=nCount + 1, _
NumColumns:=6)
End With
'Insert info in header - change date format as you wish
oNewDoc.Sections(1).Headers(wdHeaderFooterPrimary).Range.Text = _
"Comments extracted from: " & oDoc.FullName & vbCr & _
"Created by: " & Application.UserName & vbCr & _
"Creation date: " & Format(Date, "MMMM d, yyyy")
'Adjust the Normal style and Header style
With oNewDoc.Styles(wdStyleNormal)
.Font.Name = "Arial"
.Font.Size = 10
.ParagraphFormat.LeftIndent = 0
.ParagraphFormat.SpaceAfter = 6
End With
With oNewDoc.Styles(wdStyleHeader)
.Font.Size = 8
.ParagraphFormat.SpaceAfter = 0
End With
'Format the table appropriately
With oTable
.Range.Style = wdStyleNormal
.AllowAutoFit = False
.PreferredWidthType = wdPreferredWidthPercent
.PreferredWidth = 100
.Columns.PreferredWidthType = wdPreferredWidthPercent
.Columns(1).PreferredWidth = 5
.Columns(2).PreferredWidth = 5
.Columns(3).PreferredWidth = 20
.Columns(4).PreferredWidth = 40
.Columns(5).PreferredWidth = 18
.Columns(6).PreferredWidth = 12
.Rows(1).HeadingFormat = True
End With
'Insert table headings
With oTable.Rows(1)
.Range.Font.Bold = True
.Cells(1).Range.Text = "Page"
.Cells(2).Range.Text = "Line"
.Cells(3).Range.Text = "Comment scope"
.Cells(4).Range.Text = "Comment text"
.Cells(5).Range.Text = "Author"
.Cells(6).Range.Text = "Date"
End With
'Get info from each comment from oDoc and insert in table
For n = 1 To nCount
With oTable.Rows(n + 1)
'Page number
.Cells(1).Range.Text = oDoc.Comments(n).Scope.Information(wdActiveEndPageNumber)
'Line number
.Cells(2).Range.Text = oDoc.Comments(n).Scope.Information(wdFirstCharacterLineNumber)
'The text marked by the comment
.Cells(3).Range.Text = oDoc.Comments(n).Scope
'The comment itself
.Cells(4).Range.Text = oDoc.Comments(n).Range.Text
'The comment author
.Cells(5).Range.Text = oDoc.Comments(n).Author
'The comment date in format dd-MMM-yyyy
.Cells(6).Range.Text = Format(oDoc.Comments(n).Date, "dd-MMM-yyyy")
End With
Next n
Application.ScreenUpdating = True
Application.ScreenRefresh
oNewDoc.Activate
MsgBox nCount & " comments found. Finished creating comments document.", vbOKOnly, Title
ExitHere:
Set oDoc = Nothing
Set oNewDoc = Nothing
Set oTable = Nothing
End Sub
i Could not get macro output after following your steps
Hello, I have a problem :( using word 2011 for mac, when I want to run the macro on my document it gives me an error : Compile error in hidden module: DED_ExtractComments what should I do??
I just want to comment on the loudness of the mic. I don't have to have an external speaker to hear him loud and clearly.
hello harold i am not good with computers. but i think someone has posted a code in comments. i have transcribed my interview and coded with comments as advised . i need to extract the comments from my word document into a new document. can you advise me step by step how to do this. i would be very grateful. thank you
Where is the coding macro? When I view the macro, there is none.
Really useful. Thanks
I failed to did that after the adding comment steps. Is there anyone who could help me to solve my problem ?
I can't seem to get the line numbers to show up! Can anyone help me?
Great. Thank you.
Great, thank to al reviews i find the solution.
Im not sure why I cant see Extract option in my macros. Anyone knows how to settle this issue?
in the description of the video the Dr harold add a link you need check it there is the code of the macro and how you embeed it in Word, i happend the same that you but Jorge Roa discovered the trick.
worked great
Enlightenment
Good help
How do you get the line numbers in the table? The are not included in the macro.
+Dionne Barnes-Proby
'Line number
.Cells(2).Range.Text = oDoc.Comments(n).Scope.Information(wdFirstCharacterLineNumber)
Dr Harold, where should the modification be made? I tried using the Edit feature and added the line above but it didn't work. Appreciate your guidance. Thanks.
Hello Harold! I'm currently going through the same productive struggle as Samantha. Can you tell me where exactly I have to add 'Line number
.Cells(2).Range.Text = oDoc.Comments(n).Scope.Information(wdFirstCharacterLineNumber)?
This is such a great resource! I'm was feeling overwhelmed with my mixed methods data analysis. I'll be sharing this gem of knowledge with my classmates. Thank you!!!
+Harold Peach, thank you for the video! Super helpful.
But can you or anyone tell us where to enter this?
'Line number
.Cells(2).Range.Text = oDoc.Comments(n).Scope.Information(wdFirstCharacterLineNumber)
But where is the problem.
I am having trouble downloading the add-on. Anyone tech saavy who might help me?
I got the Macro added and figured out and YEAH!!! The extracting worked! Thank you so much Dr. Peach!
very useful but it did not work for my document.
Why can't I extract the comment? It doesn't work for me :(
Brilliant I love it thanks :-)
why you didnt explain the first part of how use the macro in MS will be more easy , my friend Collins couldnt sleep last night trying to understand the tutorial
Hi, WHO CAN HELP to implement and use this macro in WORD for MAC 2011. Unfortunately I am not experienced in working with macros... Thank you very much in advance !!!!
I need! How do I download this macro? I can't figure it out!
I figured it out and I am rocking and rolling! Thanks!
+Camila Torres I can't figure it out how to download this! Can someone help??
Camila can you advise me step by step how did you do this not good with computers. i have transcribed my interview, coded with comments but need to extract the comments on a separate word document. please help
Could you please help me to figure out how I can add line number to the Extracting Macro?
hi i find this video very useful. Thank you for uploading. but i am unable to use this feature in my Document. does it require any macro to download. i have no clue. kindly help
Yogesh S Atray Yes, See the description above for a link to the original macro. You will need to add this macro to your Word document and modify it to meet
your specific needs.
Harold Peach The link is empty; can you recommend another one to be used in Mac as well? By the way the video is quite useful that thank you for it!!
I guess this only works for Windows, but not Mac...I couldn't get it to work
+Dana Ng it should work with the latest version of Office for the Mac, but not with older versions.
Great explanation. Thanks. Anyone requiring help with the macro, give me a shout. Managed to get it working
Trying to get it work on Mac. Kindly help
There is no selection called 'ExtractCommentsToNewDoc' in the Macro as the video showed, Would you please help me?
HI. Mne does not extract comments in a new file, whats wrong
I've been trying this for days and it never worked, even when I followed the step by step instructions
worked for me
Wonderful! I really appreciate this video. I was desperately trying to use opencode while you have an easier access tool.
Thanks very useful. I used the link mentioned by Mad5cout and it worked
Great thanks, but it does not show the line number
This tutorial will make no sense to those who do not know what macro is, so do yourselves a favour and understand the basic functions of the macro.
finally! so basically, you gotta paste the ready-made macro (in the bio) in your visual basic to actually extract the comments! thanks a lot!
Well after an extensive amount of trial and error, I finally figure out the case of adding "line number". To include the line number just simply replace the 'author' line code with this code since I find it irrelevant to have such column on that;
'Line number
.Cells(4).Range.Text = oDoc.Comments(n).Scope.Information(wdFirstCharacterLineNumber)
please be reminded to edit (.Cells(4).Range.Text = "Author") in the insert heading section and change "author" to "line number" otherwise your "author" column will not change to "line number". I hope this helps.
This is very helpful thank you.