Word automation

Hi I have been able to create and save a Word document from within CAL code, but cannot see how to save the document as read only. Can anyone advise. Thanks Simon.

Check the documentation of the SaveAs function in Word VBA. It has a parameter named “ReadOnlyRecommended”. This parameter will cause Word to open the document in read-only mode the next time someone accesses it. Please remember that C/AL does not support optional or named parameters, so you have to supply all parameters until the one you want to set. If, instead, you want to set the read-only attribute on the file, you will have to call the “attrib” command after saving.

You can also create a foldre with specific permisson and save your word file in it And just give the read permission for other users? Best regards Alain Mouttou