第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

Savedoc2在保存docx文件C#時出現(xiàn)錯誤

Savedoc2在保存docx文件C#時出現(xiàn)錯誤

C#
守著星空守著你 2021-05-03 08:12:28
我一直在嘗試使用SaveAs2保存新的Word文檔,但無法解決該錯誤。這是我保存文件的代碼                word.Document newdocument = new word.Document();                newdocument = oword.Documents.Add(ref missing, ref missing, ref missing, ref missing);                word.Range rng = newdocument.Range(0, 0);                rng.Text = "start:\r\r" + content.Value.ToString();                rng.Text += "\rend:\r\r";                rng.Text += AnswerDictionary[content.Key.ToString()];                start = newdocument.Content.Start;                end = newdocument.Content.End;                range = newdocument.Range(ref start, ref end);                range.Select();                range.Font.Size = 11;                range.Font.Name = "Georgia";                rng.ParagraphFormat.Alignment = word.WdParagraphAlignment.wdAlignParagraphJustify;                rng.ParagraphFormat.LineSpacingRule = word.WdLineSpacing.wdLineSpaceDouble;                rng.ParagraphFormat.SpaceAfter = 0;                rng.ParagraphFormat.SpaceBefore = 0;                newfilename = @"C:\4PT\Output\" + content.Key.ToString() + ".docx";                //newdocument.SaveAs2(ref newfilename, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing, ref missing);                newdocument.SaveAs2(ref newfilename);我收到此錯誤異常:拋出:“服務(wù)器引發(fā)了異常。(來自HRESULT的異常:0x80010105(RPC_E_SERVERFAULT))”(System.Runtime.InteropServices.COMException)引發(fā)了System.Runtime.InteropServices.COMException:“服務(wù)器引發(fā)了異常。來自HRESULT的異常:0x80010105(RPC_E_SERVERFAULT))“時間:2018/4/22 11:39:12 PM線程:[9556]請告訴我我在這里做錯了什么?
查看完整描述

1 回答

?
江戶川亂折騰

TA貢獻(xiàn)1851條經(jīng)驗 獲得超5個贊

好的,我有問題。Saveas2僅用于Microsoft Office 2010,解決此問題的方法僅是使用Saveas而不是Saveas2。


查看完整回答
反對 回復(fù) 2021-05-08
  • 1 回答
  • 0 關(guān)注
  • 342 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號