View Single Post
 
Old 05-31-2024, 08:04 AM
syl3786 syl3786 is offline Windows 10 Office 2019
Advanced Beginner
 
Join Date: Jan 2023
Posts: 97
syl3786 is on a distinguished road
Default

Quote:
Originally Posted by Guessed View Post
I see you have been working on this problem for a while

Would you consider a box rather than a circle?
Code:
Sub Macro1()
  With Selection.Font.Borders(1)
    .LineStyle = Options.DefaultBorderLineStyle
    .LineWidth = Options.DefaultBorderLineWidth
    .Color = Options.DefaultBorderColor
  End With
End Sub
I appreciate your response. I actually found a way to accurately place a circle shape over specific text based on an Excel sheet, but it's limited to specific characters, a set circle size, and some adjustments by Word VBA code. However, I want the macro to calculate the position and size of the circle shape automatically. The only part I'm struggling with is the x-axis position, which isn't accurate.

I don't want to rely on Word VBA adjustments of the position since such action shouls be customized each time. My original macro is designed to add a circle shape over selected text. The issue is that the character, font size, and line spacing of the selected text can vary greatly, making accurate calculation crucial.

By the way, I did consider your suggestion of putting a circle shape in a text box and then adding the text box over the selected text. However, I think it would be much more complicated to calculate, so I'm exploring other options.

Thank you again for your suggestion, and I appreciate your input.
Reply With Quote