Home > Net >  Calls to COM components returned an error HRESULT E_FAIL error code is 2147467259
Calls to COM components returned an error HRESULT E_FAIL error code is 2147467259

Time:10-01

Test=new CCWordApp ();
Test. The Open (temppath);
ImgBar1 test. GotoBookMark (" ");
Test. InsertImage (barFileName, 90, 30);

Public void InsertImage (string strPicPath, float picWidth, float picHeight)
{
The string FileName=strPicPath;
The object LinkToFile=false;
The object SaveWithDocument=true;
Object the Anchor=oWordApplic. Selection. Range;
InlineShape InlineShape=oWordApplic. Selection. InlineShapes. AddPicture (FileName, ref LinkToFile, ref SaveWithDocument, ref Anchor);
InlineShape. Width=picWidth;
InlineShape. Height=picHeight;
}
Online, just start debugging to the corresponding label cell into the word document images, but the back has been an error, what reason be?
According to the online: 1. In the control panel - & gt; Management tools - & gt; Service, open Distributed Transaction Coordinator service,
2. Open the control panel - & gt; Management tools - & gt; Component services - & gt; Choose the computer - & gt; My computer - & gt; Right-click the properties - & gt; Choose the MSDTC - & gt; Select security configuration check the transaction manager of communication allows the outbound, allow inbound and does not require verification,
Not tried

CodePudding user response:

No one? Have a great god, and tried many ways still can't solve!!!!!

CodePudding user response:

Now you say this problem solved? I also met this problem, cannot be carried out, seek guidance

CodePudding user response:

If you have other open threads to run this gp. The Execute (tool, null) will the above problems, don't have to enable try thread is the main thread processing directly,
  •  Tags:  
  • C#
  • Related