View Single Post
 
Old 08-20-2023, 10:42 PM
gmayor's Avatar
gmayor gmayor is offline Windows 10 Office 2019
Expert
 
Join Date: Aug 2014
Posts: 4,138
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