Microsoft Word / Outlook 修剪前导 space
Microsoft Word / Outlook trims leading space
我通过 Outlook HTML 将 SQL 发送给感兴趣的人,使用 Word 作为编辑器。
我喜欢使用空格而不是制表符来格式化我的 SQL。
当我将 SQL 粘贴到编辑器中时,格式正确。
但是 'sent' 版本删除了前导空格。
例如:
Select
*
From
Employees
变成
Select
*
From
Employees
是否有防止这种情况发生的选项?
简介:以纯文本格式发送电子邮件以保留空格。
在 Outlook 2013 中花费太多时间尝试(但失败)覆盖 HTML 段落样式、覆盖列表 styles/characters 和调整自动套用格式设置后,后备解决方案可能是发送任何将空白保留为纯文本很重要的电子邮件。
可以通过以下方式发送纯文本电子邮件:
- 选择格式文本功能区选项卡。
- 在格式组中选择纯文本。
我没有找到解决方案,但找到了解决方法 - 将所有(且仅)前导 spaces 替换为 Nonbreaking Spaces。无需更换所有 space,只需更换领先的。这样 Outlook 就不会在发送电子邮件时自动 trim 它们。
发送邮件前需要
- select 文本,你想保持领先 spaces,并且 运行 查找和替换 ( Ctrl+H)
- 放入查找内容:
"^p "
(插入符号,p,space)或点击底部[特殊] 按钮并选择 段落标记 和一个 space 字符
- 放入 替换为:
"^p^s"
(caret, p, caret, s) 或者点击底部 [Special] 按钮并选择 段落标记 和 不间断 Space
- 现在按 [全部替换] - 它将用 不间断 Spaces 替换前导 spaces仅在 selected 文本中,其余所有文本保持不变。
前导 space 的结果:
First without leading spaces
One leading space in this row
No leading spaces again
One leading space in this row
Two leading spaces here
One leading space in this row
No leading spaces again
One leading space in this row
Two leading spaces here
Two leading spaces here
One leading space in this row
Two leading spaces here
Two leading spaces here
Three leading spaces here
前导不间断 spaces:
First without leading spaces
One leading space in this row
No leading spaces again
One leading space in this row
Two leading spaces here
One leading space in this row
No leading spaces again
One leading space in this row
Two leading spaces here
Two leading spaces here
One leading space in this row
Two leading spaces here
Two leading spaces here
Three leading spaces here
我通过 Outlook HTML 将 SQL 发送给感兴趣的人,使用 Word 作为编辑器。
我喜欢使用空格而不是制表符来格式化我的 SQL。
当我将 SQL 粘贴到编辑器中时,格式正确。 但是 'sent' 版本删除了前导空格。
例如:
Select
*
From
Employees
变成
Select
*
From
Employees
是否有防止这种情况发生的选项?
简介:以纯文本格式发送电子邮件以保留空格。
在 Outlook 2013 中花费太多时间尝试(但失败)覆盖 HTML 段落样式、覆盖列表 styles/characters 和调整自动套用格式设置后,后备解决方案可能是发送任何将空白保留为纯文本很重要的电子邮件。
可以通过以下方式发送纯文本电子邮件:
- 选择格式文本功能区选项卡。
- 在格式组中选择纯文本。
我没有找到解决方案,但找到了解决方法 - 将所有(且仅)前导 spaces 替换为 Nonbreaking Spaces。无需更换所有 space,只需更换领先的。这样 Outlook 就不会在发送电子邮件时自动 trim 它们。
发送邮件前需要
- select 文本,你想保持领先 spaces,并且 运行 查找和替换 ( Ctrl+H)
- 放入查找内容:
"^p "
(插入符号,p,space)或点击底部[特殊] 按钮并选择 段落标记 和一个 space 字符 - 放入 替换为:
"^p^s"
(caret, p, caret, s) 或者点击底部 [Special] 按钮并选择 段落标记 和 不间断 Space - 现在按 [全部替换] - 它将用 不间断 Spaces 替换前导 spaces仅在 selected 文本中,其余所有文本保持不变。
前导 space 的结果:
First without leading spaces
One leading space in this row
No leading spaces again
One leading space in this row
Two leading spaces here
One leading space in this row
No leading spaces again
One leading space in this row
Two leading spaces here
Two leading spaces here
One leading space in this row
Two leading spaces here
Two leading spaces here
Three leading spaces here
前导不间断 spaces:
First without leading spaces
One leading space in this row
No leading spaces again
One leading space in this row
Two leading spaces here
One leading space in this row
No leading spaces again
One leading space in this row
Two leading spaces here
Two leading spaces here
One leading space in this row
Two leading spaces here
Two leading spaces here
Three leading spaces here