Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #5  
Old 08-20-2023, 10:42 PM
gmayor's Avatar
gmayor gmayor is offline macro for in-text comments in student assignments Windows 10 macro for in-text comments in student assignments Office 2019
Expert
 
Join Date: Aug 2014
Posts: 4,142
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

The following will enter your comment text at the cursor, formatted as required.
Code:
Sub MyComment()
Dim oRng As Range
Dim sComment As String
    sComment = InputBox("Type Comment", "Inline Comment")
    If sComment = "" Then Exit Sub
    Set oRng = Selection.Range
    With oRng
        .Collapse 0
        .Text = sComment
        .Font.Color = RGB(0, 153, 255)
        .Font.Name = "Universe Condensed Light"
        .Font.Size = 11
        .Collapse 0
        .Select
    End With
    Set oRng = Nothing
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Counting the amount of comments 'done' and 'not done' with a macro caspy Word VBA 2 10-23-2022 12:27 AM
Acronym Macro - Ms Word comments Davereynolds1946 Word VBA 0 12-11-2021 04:45 AM
macro for in-text comments in student assignments Macro to maintain formatting OR to delete all text (excluding comments) jimmy12 Word VBA 6 05-15-2021 02:48 AM
Macro to highlight and bolden specific text in Word Comments PCUSER Word VBA 1 09-22-2020 03:08 PM
How to insert comments thro' macro AlexandarR Word VBA 4 06-05-2015 10:38 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:32 AM.


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