Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-22-2022, 06:47 AM
caspy caspy is offline Counting the amount of comments 'done' and 'not done' with a macro Windows 7 64bit Counting the amount of comments 'done' and 'not done' with a macro Office 2016
Novice
Counting the amount of comments 'done' and 'not done' with a macro
 
Join Date: Oct 2022
Posts: 2
caspy is on a distinguished road
Lightbulb Counting the amount of comments 'done' and 'not done' with a macro

Long time listener, first time caller (poster).

Love some of these macros.

So the I noticed there is a comment.done property, but i haven't seen it used in a macro. My query is kinda simple, I know i can extract all comments into a table and stuff like that, but i simply want to count the amount of comments that are in a document on a given day, and also count the amount of comments marked as 'done'.



Is this possible to do with a macro? I imagine it'd only be a few lines but haven't dabbled in VBA for a very long time.

That's it really.

Thank you for your time!

background; instructional designer, implementing changes from SMEs.
Reply With Quote
  #2  
Old 10-22-2022, 11:56 PM
Guessed's Avatar
Guessed Guessed is offline Counting the amount of comments 'done' and 'not done' with a macro Windows 10 Counting the amount of comments 'done' and 'not done' with a macro Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,980
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

Something like this will tell you how many are resolved.
Code:
Sub CountComments()
  Dim iResolved As Integer, aCmt As Comment
  For Each aCmt In ActiveDocument.Comments
    If aCmt.Done Then iResolved = iResolved + 1
  Next aCmt
  MsgBox "Document has " & ActiveDocument.Comments.Count & " comments. " & vbCr & "Resolved: " & iResolved
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #3  
Old 10-23-2022, 12:27 AM
caspy caspy is offline Counting the amount of comments 'done' and 'not done' with a macro Windows 7 64bit Counting the amount of comments 'done' and 'not done' with a macro Office 2016
Novice
Counting the amount of comments 'done' and 'not done' with a macro
 
Join Date: Oct 2022
Posts: 2
caspy is on a distinguished road
Smile

You LEGEND!

I knew there was a simple way to do this!

Works a treat, I owe you one!!

-c
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Counting the number of changes a macro makes John 4 Word VBA 6 09-02-2020 10:35 PM
Counting the amount of comments 'done' and 'not done' with a macro Counting rows with a macro? Jennifer Murphy Word Tables 1 08-23-2016 03:00 PM
Counting unique visitors by ward, counting monthly visits by status, editing existing workbook JaxV Excel 9 11-14-2014 12:25 AM
Counting the amount of comments 'done' and 'not done' with a macro Looking for VBA or Macro Counting a specific value occuring in single, random, changing cell? blackjack Excel Programming 1 09-11-2014 11:27 PM
Word counting macro for newly added portion? New Daddy Word VBA 24 09-30-2013 07:30 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:35 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft