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 comCodePudding user response: