X
X
XOM91K2021-11-05 13:51:07
Visual Basic
XOM91K, 2021-11-05 13:51:07

VBA EXCEL - How to make text bold and italic in Telegram Bot?

textfromExcel = Range("A5116").Value 'в ячейке A5116 текст такой "Все номера загружены" - слово "номера" должно быть выделено полужирным
MessageID_Channel = "chat_id=-10013*********"
strPostData = MessageID_Channel & "&text=" & textfromExcel
With objRequest
  .Open "POST", "https://api.telegram.org/bot13**********:AA*******_tW****************/sendMessage?", False
  .setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
  .send (strPostData)
  GetSessionId = .responseText
End With

Is there any code to make the word " numbers " bold?
I tried to insert All **numbers** into cell A5116 in Excel or All <b>numbers</b> (I edited it so that it doesn’t stand out on Habré) are loaded, but it doesn’t work.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
T
Ternick, 2021-11-05
@XOM91K

There is such a thing as formatting. Just putting symbols is not enough.
https://core.telegram.org/bots/api#sendmessage
There is a parse_mode item, it must be specified when formatting with the tag, as in html
Added to answers so that it does not appear in the list of questions, without an answer.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question