public bool ConvertReportToXPS( string myReport, string XPSFileName) { Access.Application oAccess = ((Access.Application) (Marshal.GetActiveObject( "Access.Application" ))); try { oAccess.DoCmd.OutputTo(Access.AcOutputObjectType.acOutputReport, myReport, Access.Constants.acFormatXPS, XPSFileName, System.Type.Missing, System.Type.Missing, System.Type.Missing); return true ; } catch (Exception) { throw ; } finally { Marshal.ReleaseComObject(oAccess); } }