Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 12-12-2022, 01:42 PM
bronco9588 bronco9588 is offline Error Code when Running Macro with active comment Windows 10 Error Code when Running Macro with active comment Office 2019
Novice
Error Code when Running Macro with active comment
 
Join Date: Dec 2022
Posts: 4
bronco9588 is on a distinguished road
Default Error Code when Running Macro with active comment

Thanks in advanced.



I have a word document template that is designed to be sent from an author to a peer reviewer and back to the original author. During the peer review process it is normal and expected that the reviewer would insert comments. During commenting, you need to post the comment to make another comment. When I accidentally "forget" to post the last comment and run the macro, I get an error code:

4605 "This method or property is not available because comment card is selected in pane."

or if I have my cursor selected to reply to a preexisting comment, I get the following error code:

5825 "Object has been deleted."

In both cases the problem appears to be that I have an active comment and there the active document is not the actual document. What is the best way to post the last comment text and return to the document body before running the macro?

Something like:

If ActiveDocument.Comment is Open
Post comments
ActiveDocument.Sections(1).Range.Select
End If

My apologies for poor programming.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Error Code when Running Macro with active comment Change active cell after running macro in active cell via selection change Peterson Excel Programming 3 03-07-2021 12:19 PM
Error with macro to delete starting #) [code included] puff Word VBA 1 04-18-2018 03:49 PM
VBA Code for Printing Active worksheet .. LearnerExcel Excel Programming 1 02-11-2018 01:37 AM
Error 5941 when running my macro to auto populate fields throughout the word doc VBAnovice1 Word VBA 2 05-26-2015 01:35 AM
Error Code when Running Macro with active comment VB Code in Excel Active worksheet shakilhyd Excel 2 05-17-2010 07:50 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:43 PM.


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