Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 01-10-2023, 11:02 AM
mjungli mjungli is offline [Reviving solved thread for additional help] Exporting Tracked Changes and Comments to Excel Windows 11 [Reviving solved thread for additional help] Exporting Tracked Changes and Comments to Excel Office 2021
Novice
[Reviving solved thread for additional help] Exporting Tracked Changes and Comments to Excel
 
Join Date: Jan 2023
Posts: 3
mjungli is on a distinguished road
Default [Reviving solved thread for additional help] Exporting Tracked Changes and Comments to Excel

Hello!

I am attempting to use the code from this post by Macropod using Office 365. I think the VBA language must have changed a bit from when it was written, as I'm getting a couple of errors not previously solved by the thread https://www.msofficeforums.com/word-...nts-excel.html. I was able to use the code from a separate post to export just comments, but would really like to be able to get the tracked changes as well.

The first error is 424 for


Code:
 Select Case wdRng.StoryType
I looked around on MS VBA help and updated it to this, which allowed the code to continue running (although I'm unsure it actually fixed it).
Code:
 Select Case Rng.StoryType
Then I received a 5852 error with this, which I commented out to try to move on.
Code:
Case wdMainTextStory, wdTextFrameStory
                StrOut = StrOut & "Page: " & .Range.Characters.First.Information(wdActiveEndAdjustedPageNumber) & vbTab & .Author & vbTab & .Date & vbTab
The same error 5852 occurred later with this. I tried to update from .Type to RevisionType after some searching, but the workbook results in no output aside from column titles.
Code:
Select Case .Type
I would appreciate help with these errors!
Reply With Quote
  #2  
Old 01-10-2023, 02:50 PM
macropod's Avatar
macropod macropod is offline [Reviving solved thread for additional help] Exporting Tracked Changes and Comments to Excel Windows 10 [Reviving solved thread for additional help] Exporting Tracked Changes and Comments to Excel Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

I've revised the code in the link to correct the Rng references (should be wdRng).
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 01-10-2023, 02:57 PM
mjungli mjungli is offline [Reviving solved thread for additional help] Exporting Tracked Changes and Comments to Excel Windows 11 [Reviving solved thread for additional help] Exporting Tracked Changes and Comments to Excel Office 2021
Novice
[Reviving solved thread for additional help] Exporting Tracked Changes and Comments to Excel
 
Join Date: Jan 2023
Posts: 3
mjungli is on a distinguished road
Default

Oh okay, got it now.

I tried it again, and got past that first error, but it's still getting stuck on (error 5852)

Code:
 Case wdMainTextStory, wdTextFrameStory
 StrOut = StrOut & "Page: " & .Range.Characters.First.Information(wdActiveEndAdjustedPageNumber) & vbTab & .Author & vbTab & .Date & vbTab
and if I comment that out, it gets stuck on (error 5852)

Code:
 'Get Revision Type & Scope
Select Case .Type
Thanks!
Reply With Quote
  #4  
Old 01-11-2023, 05:14 AM
macropod's Avatar
macropod macropod is offline [Reviving solved thread for additional help] Exporting Tracked Changes and Comments to Excel Windows 10 [Reviving solved thread for additional help] Exporting Tracked Changes and Comments to Excel Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

I am unable to reproduce that error on the sample file I tested the code with.

Without actually seeing the problem document, it can be difficult for anyone to diagnose the issue. Can you attach a document to a post with some representative data (delete anything sensitive)? You do this via the paperclip symbol on the 'Go Advanced' tab at the bottom of this screen.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #5  
Old 01-11-2023, 09:39 AM
mjungli mjungli is offline [Reviving solved thread for additional help] Exporting Tracked Changes and Comments to Excel Windows 11 [Reviving solved thread for additional help] Exporting Tracked Changes and Comments to Excel Office 2021
Novice
[Reviving solved thread for additional help] Exporting Tracked Changes and Comments to Excel
 
Join Date: Jan 2023
Posts: 3
mjungli is on a distinguished road
Default

Hi Macropod,

Apparently, a new day has wiped away the bug and I'm not getting the error anymore. I am not sure what I did different, if anything.

Thanks for correcting the macro! This is extremely useful.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
[Reviving solved thread for additional help] Exporting Tracked Changes and Comments to Excel Exporting Tracked Changes and Comments to Excel alzasp Word VBA 14 06-14-2022 02:13 AM
Merging certain Tracked Changes and Comments The_Chefkoch Word 0 02-01-2017 07:22 AM
Why nobody marks his thread as solved?! Catalin.B Excel 0 08-24-2011 06:23 AM
Mark a thread as solved Matrix Forum Support 0 04-22-2009 04:48 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:08 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