Do I need to set any option before I can set the Save Folder and Save folder options?
There are some boolean settings that enable some features (like bookmark detection, watermarks or security). If you do not enable the feature with the appropriate option, the details you set on how the feature should act will not be taken in account. As an example, when you set programmatically a file name and a save folder you also have to disable the prompt of the Save As dialog (set the "Prompt Save Dialog" to 0).