Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-12-2022, 02:11 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

So here is an example. I put the macro into a link on the quick reference toolbar and run 1x. I then click on reply in the comment. I then click on my macro link.

You could also add a comment and run the macro without pressing the blue arrow on comment.



Code:
Sub Macro1()
    Selection.TypeText Text:="Test Document"
    Selection.Comments.Add Range:=Selection.Range, Text:="Hi There"
    Selection.WholeStory
    Selection.MoveLeft Unit:=wdCharacter, Count:=1
End Sub
I would like to macro to post the active comment and then return to the beginning of the document. Of note, it doesn't look like you can select macros from within a comment.
Reply With Quote
Reply



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 04:00 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