英文:
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:
- cmd+G (next find)
- left Arrow
- Enter
- up arrow
- 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:
- cmd+G ( next find)
- left Arrow
- Enter
- up arrow
- 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的查找和替换工具。以下是步骤:
- 在Word中,选择编辑>查找>高级查找和替换。
- 点击替换选项卡。
- 点击向下箭头按钮以展开对话框。
- 勾选使用通配符选项。
- 在查找中,输入以下正则表达式:([0-9]{3})。这将查找连续的三个数字。
- 点击替换为字段并输入**\1^p**。这将复制找到的数字并在其后添加一个换行符。
- 点击对话框底部的格式按钮,选择样式。
- 选择您的自定义样式。
- 点击全部替换。
英文:
A series of keystrokes aren't necessary, just better use of Word's Find and Replace utility. Here are the steps:
- In Word, choose Edit>Find>Advanced Find and Replace.
- Click on the Replace tab.
- Click on the down-pointing arrowhead button to expand the dialog.
- Check the Use wildcards option
- In Find what, enter this regex: ([0-9]{3}). This will find three digits in a row.
- Click in the Replace with field and type \1^p. This copies the found number and adds a return after it.
- Click on the Format button at the bottom of the dialog and choose Style.
- Select your custom style.
- Click on Replace All.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论