How to export drawing to dxf using vba macro

I am trying to export drawing to pdf & dxf using vba macro like below,

pdfPath1 = sExportPath & sPartTitle & ".dxf"
pdfPath2 = sExportPath & sPartTitle & ".pdf"
drawing.Sheets.Item(1).PrintToFile pdfPath1
drawing.Sheets.Item(1).PrintToFile pdfPath2

It is working for pdf but exporting dxf as currupted files. unlike in catiaV5 we can do it using ExportDoc function is there any solution in V6 ?