Tag: 办公室 自动化

使用office 2010 COM的asp.net Web服务

我正在编写一个Web服务,并希望将.docx或.doc更改为.xps。 我正在使用office com来帮助我保存为.xps格式如下: [WebMethod] public string GetDocPreviewUrl(string m_userName, string m_orgFileName) { string m_returnUrl = “”; string m_orgFilePath = _currentDirectory + “\\” + m_userName + “\\” + m_orgFileName; if (File.Exists(m_orgFilePath)) { string m_xpsFilePath = _currentDirectory + “\\” + m_userName + “\\” + Path.GetFileNameWithoutExtension(m_orgFileName) + “.xps”; OfficeToXpsConversionResult m_converstionResult = OfficeToXps.ConvertToXps(m_orgFilePath, ref m_xpsFilePath); m_returnUrl = _baseUrl + m_userName […]