Export to CSV file

I have been able to use OpenRowset to import MS Excel and Text files, even export to MS Excel files. I thought there is a way to export to a csv text file. For some reason, it is not working with OpenRowSet. Yes, I can do it with a SSIS Package but is there a way to do it from code in SSMS?

Thanks

I guess can use OpenRowSet for import but not export.