Hi Carlos,
I think you can call the API LlPrintGetOptionString() with the option value LL_PRNOPTSTR_EXPORT.
In general this is documented also here in this chapter in more detail: Selecting/Querying the Output Format
But if you are using a component - information above are concentrated to use the core API of List & Label with its own printing loop - you have to use an event asking the mentioned option - have a look at this article for doing this: Export Without User Interaction Using OCX / VCL or .NET Component - combit Reporting Forum.