#1
|
|||
|
|||
Macro to make a LINE BOLD under cursor
Hi guys, can you help me with this macro - I want to make a line bold under my cursor (so I can map it to key and to a mouse key - will be doing lots of bolding) Thank you. |
#2
|
||||
|
||||
What do you mean by a 'line' in this context?
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#4
|
||||
|
||||
Unfortunately that doesn't help. There are no 'lines' as such in a Word document. Word formats text by flowing it between the current margins.
Your illustration shows text that terminates with a comma, which suggests that it may not be a complete paragraph. If it is a complete paragraph, the task is simple Code:
Sub Macro1() Selection.Paragraphs(1).Range.Font.Bold = True End Sub Code:
Sub Macro2() Selection.HomeKey Unit:=wdLine Selection.EndKey Unit:=wdLine, Extend:=wdExtend Selection.Font.Bold = True End Sub In both cases put the cursor in the 'line' and run the macro.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#5
|
|||
|
|||
The second one works like a charm. Thank you
|
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Autotext entry is taking the cursor to next line/new line | skhan | Word | 10 | 01-31-2019 06:37 PM |
Table: make the bottom line not bold or less thick | village | Word Tables | 2 | 08-22-2017 06:04 AM |
Using IF to make bold | bigukfan | Mail Merge | 2 | 03-07-2014 01:54 AM |
Format Bold in one line makes all lines bold | Nitte | Word | 2 | 02-07-2013 12:34 AM |
Autocorrect to make words Bold? | GB89 | Word | 1 | 04-15-2010 09:04 PM |