Home > Back-end >  CB2010 using OLE to insert the picture inside the form of word, position, how to return a responsibi
CB2010 using OLE to insert the picture inside the form of word, position, how to return a responsibi

Time:09-25

Is the third form, eight lines of seven columns, including 8 done after several cell using the following code to merge, merger there is no problem,
 
Start_cell=vTable. OleFunction (" Cell ", 8, 2);
End_cell=vTable. OleFunction (" Cell ", 8, 7);
Start_cell. OleProcedure (" Merge ", end_cell);


In line 8 first, the second case (combined) to fill in content, the code is as follows:
 
VCell=vTable. OleFunction (" Cell ", 8, 1);
VCell. OlePropertySet (" Range "and" winding deformation condition and maintenance advice ");
VCell=vTable. OleFunction (" Cell ", 8, 2);
VCell. OlePropertySet (" Range "and" content content ");

This is no problem,

Now, want to line 8 2 insert pictures, always is not successful, the code is as follows:
 AnsiString 
StrPicFile="C: \ \ vi. Emf";
VTable=vWordApp. OlePropertyGet (" ActiveDocument "). The OleFunction (" Range "). OlePropertyGet (" Tables "). OleFunction (" Item ", 3);
VTable. OleFunction (" Cell ", 8, 2) OleFunction (" Select ");
The Variant vShape=vWordApp. OlePropertyGet (" Selection "). OlePropertyGet (" InlineShapes "). OleFunction (" AddPicture, "strPicFile. C_str (), false, true);

The phenomenon is images insert to the position of the line 8 1, but the content of the "content" line 8, 2 these words, and feel is replaced by images down, but the picture why run to 1?

CodePudding user response:



For the old demon help, greatly help!

CodePudding user response:

Implore you busy schedule to help ah, thank you very much!

CodePudding user response:

Oh, so long and there is no answer, then top up, call the great god,

CodePudding user response:

That day I saw this post, but then forget, have you got a demo to me, I help you to analyze, cbfans at 163 dot com

CodePudding user response:

reference 4 floor ccrun response:
that day I saw this post, but then forget, have you got a demo to me, I help you to analyze, cbfans at 163 dot com


Email has been sent, looking forward to reply,

CodePudding user response:

Demon elder brother, you received the mail for me?

CodePudding user response:

Oh, I had forgot it, I see,

CodePudding user response:

Demon elder brother, you forget me ah, have the answer to my email account, thank you very much ah, zhangjun4u AT 126 DOT com

CodePudding user response:

I again to your cbfans at 163 dot com email sent again,
  • Related