![]() |
|
#1
|
|||
|
|||
|
Hi Folks,
In the VBA Editor that comes with Word, is there a command to "duplicate current line?" Upon searching the VBAE and Google, it seems like there is not. But maybe I'm missing something? Surely this is a pretty common need that people have?? Similarly, I can't find a command to "Comment in/out" a block of code... Thoughts? EDIT: I did find the "comment/uncomment" toolbar buttons. I guess by default they are not in the menus... Last edited by Steve Kunkel; 04-25-2021 at 01:52 PM. Reason: update |
|
#2
|
||||
|
||||
|
A command to duplicate a line (which there isn't) would likely take as many or more keystrokes to implement as a simple copy/paste.
The 'Edit' toolbar has buttons to "Comment/Uncomment" a block of code. You can activate that toolbar via View|Toolars|Edit.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
#3
|
|||
|
|||
|
Quote:
WARNING -- NOT VBA CODE! Code:
SetTitleMatchMode, 2 ; Win titles must contain specified string.
#ifWinActive, Microsoft Visual Basic for Applications
!c:: ;Alt-c activates it, but only in VBA Editor
send {End}
send +{Home} ;shift+home
send ^c ;copy
send '^v ;apostrophe, paste
send {Enter}
send ^v ;paste
return
#ifWinActive
|
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
How to put a diagonal line through a character or expression in the Word 2007 Equation Editor
|
RobertWA | Word | 3 | 11-07-2020 06:58 AM |
| Force one line functions using equation editor | awa5114 | Word | 0 | 05-30-2017 03:30 AM |
| Duplicate Line Displayed | LarryStroup | Word | 3 | 06-05-2015 03:20 AM |
VBA to solve duplicate words in one line
|
Bookmaster | Word VBA | 7 | 02-03-2015 04:30 PM |
How to insert a (balloon) comment and how to disable comment feature in Word2007?
|
pstein | Word | 2 | 03-31-2012 05:31 AM |