Skip to main content
Version: v6.5.0

Create image message

Command Description

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

Command Prototype

MessageObject = DingTalk.CreateImageMessage(DingTalk_obj, file)

Command parameter

parametermandatorytypedefault valueInstructions
DingTalk_objTrueexpressionDingTalkObjectThe DingTalk object created using the DingTalk. Create command
fileTruepath''' C:\Users'''Specify the path of an image file, with a maximum size of 1MB and support for uploading JPG, GIF, PNG, BMP formats. It is recommended to have a width of 600 pixels and a height of 400 pixels, with an aspect ratio of 3:2

Return result

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

Run instance

/********************************* Create Image Message **************************************
Command Prototype:
MessageObject = DingTalk.CreateImageMessage(DingTalk_obj, file)
Input Parameters:
DingTalk_obj -- DingTalk object. Note: DingTalk object created using the DingTalk.Create command.
file -- Image file. Note: Specify the path of an image file. Maximum file size is 1MB, supports uploading jpg, gif, png, bmp formats. Recommended dimensions: 600px width x 400px height, aspect ratio 3:2.
Output Parameters:
return_array -- Variable to store the output of the function call.
Important Notes:
None
********************************************************************************/
Dim return_array = ""
MessageObject = DingTalk.CreateImageMessage(DingTalkObject, '''C:\Users''')
TracePrint(return_array)