Not if you are happy for the current settings to apply - prompt/no prompt/default path etc. Your app should do the same as any other app. Mostly, that means a prompt.
What you cannot do is use standard "print to file" techniques; this will not do anything useful, though it will write a file. Expect a prompt.
The SDK describes how to suppress the prompt and specify a file name.