如何在 MS Word 中应用一系列快捷键

huangapple go评论78阅读模式
英文:

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 to do this for a general integer). Therefore, 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 had no success. Any help would be greatly appreciated.
CS

英文:

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

答案1

得分: 1

以下是已翻译的内容:

一系列按键操作并非必要,最好使用Word的查找和替换工具。以下是步骤:

  1. 在Word中,选择编辑>查找>高级查找和替换
  2. 点击替换选项卡。
  3. 点击向下箭头按钮以展开对话框。
  4. 勾选使用通配符选项。
  5. 查找中,输入以下正则表达式:([0-9]{3})。这将查找连续的三个数字。
  6. 点击替换为字段并输入**\1^p**。这将复制找到的数字并在其后添加一个换行符。
  7. 点击对话框底部的格式按钮,选择样式
  8. 选择您的自定义样式。
  9. 点击全部替换
英文:

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.

huangapple
  • 本文由 发表于 2020年1月7日 01:22:27
  • 转载请务必保留本文链接:https://go.coder-hub.com/59616366.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定