简体   繁体   中英

How To Apply A Sequence of Shortcut Keys in MS Word

I am using MS word 365 on Mac. I have a line like

123 ibsom sic  asdfas
sdfsdfsdf asdf
sdfsdf asdfasdf

124 sdfasdf  asdfasdf
asdfasdf  asdfasdf

I need to center the numbers and move them up!

      123 
ibsom sic  asdfas
sdfsdfsdf asdf
sdfsdf asdfasdf

      124 
sdfasdf  asdfasdf
asdfasdf  asdfasdf

I created a style to make numbers bold and center them ( assigned F3 in MS word for that). I also used the regex (^#^#^# to find 3 digit numbers, admit don't know how do this for a general integer). There for I need to repeatedly apply a sequence of shortcut keys:

  1. cmd+G ( next find)
  2. left Arrow
  3. Enter
  4. up arrow
  5. F3 ( apply the MS WORD style)

How can I do this, please? I used macros but I had not success. Any help would be greatly appreciated. CS

A series of keystrokes aren't necessary, just better use of Word's Find and Replace utility. Here are the steps:

  1. In Word, choose Edit>Find>Advanced Find and Replace .
  2. Click on the Replace tab.
  3. Click on the down-pointing arrowhead button to expand the dialog.
  4. Check the Use wildcards option
  5. In Find what , enter this regex: ([0-9]{3}) . This will find three digits in a row.
  6. Click in the Replace with field and type \\1^p . This copies the found number and adds a return after it.
  7. Click on the Format button at the bottom of the dialog and choose Style .
  8. Select your custom style.
  9. Click on Replace All .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM