Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 05-31-2024, 08:04 AM
syl3786 syl3786 is offline Word Macro: Insert Circle Shape over selected text Windows 10 Word Macro: Insert Circle Shape over selected text Office 2019
Advanced Beginner
Word Macro: Insert Circle Shape over selected text
 
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
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Word Macro issues (Circle Shape) syl3786 Word VBA 6 04-23-2024 06:06 AM
Word Macro: Insert Circle Shape over selected text Seeking Assistance with Word Macro to Add Transparent, Blue Line Circle Shape syl3786 Word VBA 5 01-21-2024 03:41 AM
Word Macro: Insert Circle Shape over selected text Find and Replace Selected Text or Macro for finding selected text mrplastic Word VBA 4 12-20-2019 01:25 PM
Word Macro: Insert Circle Shape over selected text Word 2016 how to insert a text shape into a word doc ? zillah Word 2 11-14-2019 03:27 AM
Macro to insert different sets of text at bookmark depending on sequence of selected check boxes chipper09 Word VBA 0 06-21-2018 01:49 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:11 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