none
ActiveWindow.View.Reviewers - How to get reviewer name? RRS feed

  • Question

  • Hello,

    I know that I can use 'ActiveWindow.View.Reviewers("John Smith")' and 'ActiveWindow.View.Reviewers(1)', but how do I retrieve the name of all reviewers?

    The documents in question have thousands of tracked changes, so unfortunately navigating and collecting ActiveDocument.Revisions(x).Author is not an option.

    How do I grab the 'name' information?

    Thankful beforehand.



    • Edited by MarcHaus Wednesday, January 11, 2012 2:09 AM
    • Moved by Kee Poppy Thursday, January 12, 2012 3:41 AM (From:Visual Basic General)
    Wednesday, January 11, 2012 2:08 AM

Answers

  • Hi MarcHaus,

     

    You might try to do the following, this worked for me:

     

     

    Sub Test()
    
    Dim objRev As Revision
    Dim objRange As Range
    
    ' set range to whole document
    Set objRange = ActiveDocument.Range
    
    ' loop through document to retrieve all the Author names
    For Each objRev In objRange.Revisions
        Debug.Print objRev.Author
    Next objRev
    
    End Sub
    



    Hope this helps,

     


    Daniel van den Berg | Washington, USA | "Anticipate the difficult by managing the easy"
    Friday, January 13, 2012 1:25 AM
    Moderator

All replies

  • Marc,

    Somehow I've the idea your question is not about VB for Visual Studio Net wherefore this forum is created.

    However, beside that I can think about many. I've no clue about what tool your question is about. 

    Can you give some code or explain that a little bit more?


    Success
    Cor
    Wednesday, January 11, 2012 9:15 AM
  • Cor,

    It is VBA, for Word more specifically.

    I could not find any forum for VBA, so assumed this was the closest match.

    Cheers,

    Marc

    Thursday, January 12, 2012 12:36 AM
  • Hi Marc,

    We have a dedicated forum for VBA questions. I will move this thread there for better support.

    Have a nice day,


    Kee Poppy [MSFT]
    MSDN Community Support | Feedback to us
    Thursday, January 12, 2012 3:41 AM
  • Hi MarcHaus,

     

    You might try to do the following, this worked for me:

     

     

    Sub Test()
    
    Dim objRev As Revision
    Dim objRange As Range
    
    ' set range to whole document
    Set objRange = ActiveDocument.Range
    
    ' loop through document to retrieve all the Author names
    For Each objRev In objRange.Revisions
        Debug.Print objRev.Author
    Next objRev
    
    End Sub
    



    Hope this helps,

     


    Daniel van den Berg | Washington, USA | "Anticipate the difficult by managing the easy"
    Friday, January 13, 2012 1:25 AM
    Moderator