Passing arguments using CMD

I have created a Libre office macro as below;

Sub CheckHello1()
msgbox “Hello”
end sub

I want to run this macro using CMD and I used the below syntax in CMD and it worked.
“C:\Program Files\LibreOffice\program\soffice.exe” “\Server1\Library\Check.ods” “vnd.sun.star.script:Standard.Module1.CheckHello1?language=Basic&location=document”

I then wanted to pass an argument to this and modified the macro like below;
Sub CheckHello(InText as String)
msgbox InText
end sub

I then used the below syntax in CMD but it fails. Its not considering the argument as argument, but a file.
“C:\Program Files\LibreOffice\program\soffice.exe” “\Server1\Library\Check.ods” “vnd.sun.star.script:Standard.Module1.CheckHello?language=Basic&location=document” “Hello”

How do I pass an argument using CMD?

Thanks in advance for your help.

See Soffice called from a command line specifying a macro: How can the macro see the command (parameters)?
Good luck,
ms777

See also this topic.