Excel to whatsapp message (With new line in text)

prince
2StarLounger
Posts: 149
Joined: 02 Mar 2015, 17:00

Excel to whatsapp message (With new line in text)

Post by prince »

Hello Sir/Madam, I have an excel sheet that connects with the WhatsApp web. But the problem is I need a new line in the message that is not reflecting on Whatsapp message. I have 100+ records and each record has 10+ new lines. Kindly suggest to me the best way to do this.
Copy enclosed

Thanks & regards,
Prince
You do not have the required permissions to view the files attached to this post.

User avatar
HansV
Administrator
Posts: 71250
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Excel to whatsapp message (With new line in text)

Post by HansV »

I cannot test this; does it help if you use

Code: Select all

    Message = Replace(Sheet1.Cells(rowno, 2).Value, vbLf, vbCrLf)
    Amount = Replace(Sheet1.Cells(rowno, 3).Value, vbLf, vbCrLf)
or

Code: Select all

    Message = Replace(Sheet1.Cells(rowno, 2).Value, vbLf, "%0a")
    Amount = Replace(Sheet1.Cells(rowno, 3).Value, vbLf, "%0a")
Regards,
Hans

prince
2StarLounger
Posts: 149
Joined: 02 Mar 2015, 17:00

Re: Excel to whatsapp message (With new line in text)

Post by prince »

It's working. Thank you so much for your kind support. Really you are a great man.

prince
2StarLounger
Posts: 149
Joined: 02 Mar 2015, 17:00

Re: Excel to whatsapp message (With new line in text)

Post by prince »

Sir, Is this possible to use the same font & alignment (eg. center) of excel can be used on WhatsApp?

User avatar
HansV
Administrator
Posts: 71250
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Excel to whatsapp message (With new line in text)

Post by HansV »

Which of my suggestions worked? The first one or the second one?
Regards,
Hans

prince
2StarLounger
Posts: 149
Joined: 02 Mar 2015, 17:00

Re: Excel to whatsapp message (With new line in text)

Post by prince »

second worked.

prince
2StarLounger
Posts: 149
Joined: 02 Mar 2015, 17:00

Re: Excel to whatsapp message (With new line in text)

Post by prince »

Sir, Is this possible to use the same font & alignment (eg. center align and font algerian) of excel that can be used on WhatsApp?

User avatar
HansV
Administrator
Posts: 71250
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Excel to whatsapp message (With new line in text)

Post by HansV »

As far as I know, WhatsApp doesn't support that. You may be able to make text bold, italic or strikethrough, but not to change the font and alignment
Regards,
Hans

User avatar
StuartR
Administrator
Posts: 11388
Joined: 16 Jan 2010, 15:49
Location: London, Europe

Re: Excel to whatsapp message (With new line in text)

Post by StuartR »

I don't think WhatsApp supports any text formatting at all. You could paste the text as an image, using text formatted in some other application, but that's about it
StuartR


User avatar
Leif
Administrator
Posts: 7029
Joined: 16 Jan 2010, 08:21

Re: Excel to whatsapp message (With new line in text)

Post by Leif »

As far as I am aware, the only formatting that WhatsApp accepts can be found at WhatsApp Help Center - How to format your messages

In summary:

Italic: To italicize your message, place an underscore on both sides of the text:
_text_

Bold: To bold your message, place an asterisk on both sides of the text:
*text*

Strikethrough: To strikethrough your message, place a tilde on both sides of the text:
~text~

Monospace: To monospace your message, place three backticks on both sides of the text:
```text```
Leif.

User avatar
StuartR
Administrator
Posts: 11388
Joined: 16 Jan 2010, 15:49
Location: London, Europe

Re: Excel to whatsapp message (With new line in text)

Post by StuartR »

I never knew that, thank you Leif
StuartR


User avatar
Leif
Administrator
Posts: 7029
Joined: 16 Jan 2010, 08:21

Re: Excel to whatsapp message (With new line in text)

Post by Leif »

StuartR wrote:
10 Jun 2021, 09:06
I never knew that, thank you Leif
On my Android, formatting occurs 'live' as you type, and so you can preview it before sending. On the WhatsApp on my W7 machine, you don't get to see the formatting until you have sent the message.
Leif.

User avatar
HansV
Administrator
Posts: 71250
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Excel to whatsapp message (With new line in text)

Post by HansV »

Also in WhatsApp for Android, tap and hold on a word in your message, and a context menu should pop up with Bold, Italic etc.
Regards,
Hans

prince
2StarLounger
Posts: 149
Joined: 02 Mar 2015, 17:00

Re: Excel to whatsapp message (With new line in text)

Post by prince »

Thank you for the wonderful suggestions. I will use the same.

prince
2StarLounger
Posts: 149
Joined: 02 Mar 2015, 17:00

Re: Excel to whatsapp message (With new line in text)

Post by prince »

Why not Whatsapp is supporting the full custom message of excel after trigger SEND button?
Copy enclosed.

Thanks and regards
Prince
You do not have the required permissions to view the files attached to this post.

User avatar
HansV
Administrator
Posts: 71250
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Excel to whatsapp message (With new line in text)

Post by HansV »

I'm afraid it is not possible for me to test the code. Sorry!
Regards,
Hans

prince
2StarLounger
Posts: 149
Joined: 02 Mar 2015, 17:00

Re: Excel to whatsapp message (With new line in text)

Post by prince »

Thank you for your quick response sir. Luckily, I found the mistake. The code is correct. It was a special character (&) mistake that not supported by whatsapp in a simple text.
Thank you for the quick support.
With regards
Prince

User avatar
HansV
Administrator
Posts: 71250
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Excel to whatsapp message (With new line in text)

Post by HansV »

Glad you found it!
Regards,
Hans