Skip to main content
Version: v6.5.0

Create file message

Command Description

Specify the path of a regular file, with a maximum size of 10MB, supporting uploading in doc, docx, xls, xlsx, ppt, pptx, zip, pdf, rar formats

Command Prototype

MessageObject = DingTalk.CreateFileMessage(DingTalk_obj, file)

Command parameter

parametermandatorytypedefault valueInstructions
DingTalk_objTrueexpressionDingTalkObjectThe DingTalk object created using the DingTalk. Create command
fileTruepath''' C:\Users'''Specify a file path with a file size not exceeding 10MB

Return result

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

Run instance

/********************************* Create File Message **************************************
Command Prototype:
MessageObject = DingTalk.CreateFileMessage(DingTalk_obj, file)
Input Parameters:
DingTalk_obj -- DingTalk object. Note: DingTalk object created using the DingTalk.Create command.
file -- File path. Note: Specify the path of a file. File size should not exceed 10MB.
Output Parameters:
return_array -- Variable to store the output of the function call.
Important Notes:
None
********************************************************************************/
Dim return_array = ""
MessageObject = DingTalk.CreateFileMessage(DingTalkObject, '''C:\Users''')
TracePrint(return_array)