搜尋 Mozilla 技術支援網站

防止技術支援詐騙。我們絕對不會要求您撥打電話或發送簡訊,或是提供個人資訊。請用「回報濫用」功能回報可疑的行為。

了解更多

Automating Thunderbird from Excel VBA - problem with vbNewline in message body

more options

I am using VBA from Excel to provide an automated set of emails using the Thunderbird command line (thunderbird -compose). When the message body is something like "String1" & vbNewLine & "String2", the email message body comes out as the newline first, then String1 the String2. I've tried several variations such as using vbCRLF, CHR$(10), etc. but they all do the same thing.

Any ideas anyone?

I am using VBA from Excel to provide an automated set of emails using the Thunderbird command line (thunderbird -compose). When the message body is something like "String1" & vbNewLine & "String2", the email message body comes out as the newline first, then String1 the String2. I've tried several variations such as using vbCRLF, CHR$(10), etc. but they all do the same thing. Any ideas anyone?

被選擇的解決方法

vbnewline inserts a carriage control and line feed pair into the text. chr$(10) and chr$(11) if I remember from 20 years ago.

The Thunderbird composer uses HTML, so what you need to do is send a HTML paragraph not and windows ascii line feed.

從原來的回覆中察看解決方案 👍 0

所有回覆 (2)

more options

選擇的解決方法

vbnewline inserts a carriage control and line feed pair into the text. chr$(10) and chr$(11) if I remember from 20 years ago.

The Thunderbird composer uses HTML, so what you need to do is send a HTML paragraph not and windows ascii line feed.

more options

Thanks Matt - I should have realised!