Excel to whatsapp message (With new line in text)
-
- 2StarLounger
- Posts: 171
- Joined: 02 Mar 2015, 17:00
Excel to whatsapp message (With new line in text)
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
Copy enclosed
Thanks & regards,
Prince
Last edited by prince on 22 Apr 2022, 06:24, edited 1 time in total.
-
- Administrator
- Posts: 78595
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Excel to whatsapp message (With new line in text)
I cannot test this; does it help if you use
or
Code: Select all
Message = Replace(Sheet1.Cells(rowno, 2).Value, vbLf, vbCrLf)
Amount = Replace(Sheet1.Cells(rowno, 3).Value, vbLf, vbCrLf)
Code: Select all
Message = Replace(Sheet1.Cells(rowno, 2).Value, vbLf, "%0a")
Amount = Replace(Sheet1.Cells(rowno, 3).Value, vbLf, "%0a")
Best wishes,
Hans
Hans
-
- 2StarLounger
- Posts: 171
- Joined: 02 Mar 2015, 17:00
Re: Excel to whatsapp message (With new line in text)
It's working. Thank you so much for your kind support. Really you are a great man.
-
- 2StarLounger
- Posts: 171
- Joined: 02 Mar 2015, 17:00
Re: Excel to whatsapp message (With new line in text)
Sir, Is this possible to use the same font & alignment (eg. center) of excel can be used on WhatsApp?
-
- Administrator
- Posts: 78595
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Excel to whatsapp message (With new line in text)
Which of my suggestions worked? The first one or the second one?
Best wishes,
Hans
Hans
-
- 2StarLounger
- Posts: 171
- Joined: 02 Mar 2015, 17:00
Re: Excel to whatsapp message (With new line in text)
second worked.
-
- 2StarLounger
- Posts: 171
- Joined: 02 Mar 2015, 17:00
Re: Excel to whatsapp message (With new line in text)
Sir, Is this possible to use the same font & alignment (eg. center align and font algerian) of excel that can be used on WhatsApp?
-
- Administrator
- Posts: 78595
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Excel to whatsapp message (With new line in text)
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
Best wishes,
Hans
Hans
-
- Administrator
- Posts: 12623
- Joined: 16 Jan 2010, 15:49
- Location: London, Europe
Re: Excel to whatsapp message (With new line in text)
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
-
- Administrator
- Posts: 7216
- Joined: 15 Jan 2010, 22:52
- Location: Middle of England
Re: Excel to whatsapp message (With new line in text)
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```
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
-
- Administrator
- Posts: 12623
- Joined: 16 Jan 2010, 15:49
- Location: London, Europe
-
- Administrator
- Posts: 7216
- Joined: 15 Jan 2010, 22:52
- Location: Middle of England
Re: Excel to whatsapp message (With new line in text)
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
-
- Administrator
- Posts: 78595
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Excel to whatsapp message (With new line in text)
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.
Best wishes,
Hans
Hans
-
- 2StarLounger
- Posts: 171
- Joined: 02 Mar 2015, 17:00
Re: Excel to whatsapp message (With new line in text)
Thank you for the wonderful suggestions. I will use the same.
-
- 2StarLounger
- Posts: 171
- Joined: 02 Mar 2015, 17:00
Re: Excel to whatsapp message (With new line in text)
Why not Whatsapp is supporting the full custom message of excel after trigger SEND button?
Copy enclosed.
Thanks and regards
Prince
Copy enclosed.
Thanks and regards
Prince
Last edited by prince on 22 Apr 2022, 06:24, edited 1 time in total.
-
- Administrator
- Posts: 78595
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Excel to whatsapp message (With new line in text)
I'm afraid it is not possible for me to test the code. Sorry!
Best wishes,
Hans
Hans
-
- 2StarLounger
- Posts: 171
- Joined: 02 Mar 2015, 17:00
Re: Excel to whatsapp message (With new line in text)
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
Thank you for the quick support.
With regards
Prince
-
- Administrator
- Posts: 78595
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
-
- NewLounger
- Posts: 1
- Joined: 01 Jan 2022, 16:10
Re: Excel to whatsapp message (With new line in text)
Help with the following code please:
textmessage = Replace(Sheets(1).Range("Q" & i).Value, vbLf, **NEW LINE**)
All of my codes are working perfectly fine and this part of the code which I am using to send messages from excel to whatsapp. The problem is, the message doesn't go in one whole chunk but in seperate line breaks, which doesn't look good. So I am trying to replace the vbLf with something that will help me to send the message as a whole. So what should I write after coma, in the asterik part to create line breaks? I tried %0a, vbCrLf, vblf.
Nothing works. I tried to use application.sendkeys ("+{ENTER}") also ("+~") also ("^~") also ("^{ENTER}"), i think one of these might work but I don't know how to code within the replace function.
Or may be if you have any other solution, please help. Thank you
textmessage = Replace(Sheets(1).Range("Q" & i).Value, vbLf, **NEW LINE**)
All of my codes are working perfectly fine and this part of the code which I am using to send messages from excel to whatsapp. The problem is, the message doesn't go in one whole chunk but in seperate line breaks, which doesn't look good. So I am trying to replace the vbLf with something that will help me to send the message as a whole. So what should I write after coma, in the asterik part to create line breaks? I tried %0a, vbCrLf, vblf.
Nothing works. I tried to use application.sendkeys ("+{ENTER}") also ("+~") also ("^~") also ("^{ENTER}"), i think one of these might work but I don't know how to code within the replace function.
Or may be if you have any other solution, please help. Thank you
-
- Administrator
- Posts: 78595
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Excel to whatsapp message (With new line in text)
Welcome to Eileen's Lounge!
Using "%0a" worked for the original poster in this thread, I don't know why it doesn't work for you. It might be easier to replace vbLf with a space " ".
SendKeys won't help, this is used to send commands to an application; it won't work to replace characters in a text string.
Using "%0a" worked for the original poster in this thread, I don't know why it doesn't work for you. It might be easier to replace vbLf with a space " ".
SendKeys won't help, this is used to send commands to an application; it won't work to replace characters in a text string.
Best wishes,
Hans
Hans