2
我想格式化使用c#中的文字背後的文字Inlineshapes。我試圖轉換成拋出錯誤的形狀。請幫助: -我想格式化使用c中的文字背後的文字形狀#
Words.Word.Application wordApp = new Words.Word.Application(); // Create word apps
Words.Word.Document wordDoc = wordApp.Documents.Add(ref wordPath1, ref missing, ref missing, ref missing);
start = wordApp.ActiveDocument.Content.End - 1;
Words.Word.Range rg1 = wordDoc.Range(ref start, ref missing);
rg1.InsertBreak(ref pageBreak);
rg1.InsertAfter("\r");
rg1.InlineShapes.AddPicture(files[0], ref myTrue, ref missing, ref missing); //Get Image to insert on word docs
rg1.InlineShapes[0].Height = 500;
rg1.InlineShapes[0].Width = 500;
rg1.InlineShapes[0].ConvertToShape(); //Throwing error
什麼是錯誤拋出? – Thomas
錯誤是:hresult e_fail已從調用com組件返回 – skt
當我嘗試使用ConvertToShame()方法將InLineshapes轉換爲形狀對象時,會引發此問題 – skt