Create a voice message
Command Description
Specify the path of a voice file, with a maximum size of 2MB and no more than 60 seconds. It supports uploading in AMR and Speex formats
Command Prototype
MessageObject = WxWork.CreateVoiceMessage(wxwork_obj, file)
Command parameter
parameter | mandatory | type | default value | Instructions |
---|---|---|---|---|
wxwork_obj | True | expression | WxWorkObject | Enterprise WeChat object created using the WxWork. Create command |
file | True | path | "" | Specify a voice file path that only supports AMR format, does not exceed 60 seconds, and does not exceed 2MB |
Return result
Return_array, Assign the result of running the command to this variable.
Run instance
/********************************* Create Voice Message **************************************
Command Prototype:
MessageObject = WxWork.CreateVoiceMessage(wxwork_obj, file)
Input Parameters:
wxwork_obj -- WeChat Work object. Note: WeChat Work object created using the WxWork.Create command.
file -- Voice file. Note: Specify the path of a voice file. Only supports AMR format, not exceeding 60 seconds and 2MB.
Output Parameters:
return_array -- Variable to store the output of the function call.
Important Notes:
None
********************************************************************************/
Dim return_array = ""
MessageObject = WxWork.CreateVoiceMessage(WxWorkObject, "")
TracePrint(return_array)