Create link message
Command Description
Create a link message that can be sent to employees or in groups in the future
Command Prototype
MessageObject = DingTalk.CreateLinkMessage(DingTalk_obj, url, pic_file, title, description)
Command parameter
parameter | mandatory | type | default value | Instructions |
---|---|---|---|---|
DingTalk_obj | True | expression | DingTalkObject | The DingTalk object created using the DingTalk. Create command |
url | True | string | "" | Specify a URL link that will automatically open when the recipient clicks on the message |
pic_file | True | path | ''' 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 |
title | True | string | "" | Specify a title for a link message, preferably within 100 characters |
description | True | string | "" | Specify a description for a link message, preferably within 500 characters |
Return result
Return_array, Assign the result of running the command to this variable.
Run instance
/********************************* Create Link Message **************************************
Command Prototype:
MessageObject = DingTalk.CreateLinkMessage(DingTalk_obj, url, pic_file, title, description)
Input Parameters:
DingTalk_obj -- DingTalk object. Note: DingTalk object created using the DingTalk.Create command.
url -- URL link. Note: Specify a URL link. When the recipient clicks this message, this URL link will automatically open.
pic_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.
title -- Title. Note: Specify a title for the link message, recommended within 100 characters.
description -- Description. Note: Specify a description for the link message, recommended within 500 characters.
Output Parameters:
return_array -- Variable to store the output of the function call.
Important Notes:
None
********************************************************************************/
Dim return_array = ""
MessageObject = DingTalk.CreateLinkMessage(DingTalkObject, "", '''C:\Users''', "", "")
TracePrint(return_array)