[OutLook]引用符挿入
昭和な『おぢさん』からの依頼
選択範囲の行頭に>引用符を挿入します。
ダウンロード - microsoft20outlook.zip
tell application "Microsoft Outlook"
set theSelectedText to selected text as text
end tell
set AppleScript's text item delimiters to "\n"
set listSelectedText to every text item of theSelectedText
set numCntList to count of listSelectedText
set numCntText to 1 as integer
set theReplaceText to "" as text
repeat numCntList times
if numCntText is 1 then
set theReplaceText to theReplaceText & (">" & (item numCntText of listSelectedText) as text) as text
else
set theReplaceText to theReplaceText & "\n" & (">" & (item numCntText of listSelectedText) as text) as text
end if
set numCntText to (numCntText + 1) as integer
end repeat
----最後に改行いれる処理(お好みで)
set theReplaceText to (theReplaceText & "\n") as text
tell application "Microsoft Outlook"
set selected text to theReplaceText as text
end tell
--------------文字の置き換えサブルーチン
to doReplace(theText, theOrgStr, theNewStr)
set theOldDelim to AppleScript's text item delimiters
set AppleScript's text item delimiters to theOrgStr
set theTmpList to every text item of theText
set AppleScript's text item delimiters to theNewStr
set theReplaceStr to theTmpList as text
set AppleScript's text item delimiters to theOldDelim
return theReplaceStr
end doReplace
| 固定リンク
「Office」カテゴリの記事
- LibreOffice LibreOffice ja Language Pack(2023.07.21)
- Microsoft 365 Cloud Fontsの気になった書体(2021.11.12)
- Microsoft 365 Cloud Fonts(修正版)(2021.11.11)
- [OutLook]引用符挿入(2021.10.04)
- Microsoft Office License Removal 2.1(2020.09.15)