Skip to main content
Version: v6.5.0

Create a voice message

Command Description

Create a voice message that can be sent to employees or in groups in the future

Command Prototype

MessageObject = DingTalk.CreateVoiceMessage(DingTalk_obj, file)

Command parameter

parametermandatorytypedefault valueInstructions
DingTalk_objTrueexpressionDingTalkObjectThe DingTalk object created using the DingTalk. Create command
fileTruepath''' C:\Users'''Specify the path of a voice file, with a maximum size of 2MB, and support for uploading AMR, MP3, and WAV formats

Return result

Return_array, Assign the result of running the command to this variable.

Run instance

/********************************* Create Voice Message **************************************
Command Prototype:
MessageObject = DingTalk.CreateVoiceMessage(DingTalk_obj, file)
Input Parameters:
DingTalk_obj -- DingTalk object. Note: DingTalk object created using the DingTalk.Create command.
file -- Voice file. Note: Specify the path of a voice file. Maximum file size is 2MB, supports uploading amr, mp3, wav formats.
Output Parameters:
return_array -- Variable to store the output of the function call.
Important Notes:
None
********************************************************************************/
Dim return_array = ""
MessageObject = DingTalk.CreateVoiceMessage(DingTalkObject, '''C:\Users''')
TracePrint(return_array)