mmazeemahmad
New member
- Joined
- May 10, 2020
- Messages
- 4
- Programming Experience
- 3-5
Dear All,
I am using the following code where i am trying to insert an image at current position or where event the user cursor is currently there but always it insert it on top of the word document can anyone please guide the missing bit:
Microsoft.Office.Interop.Word._Application oWord;
object oMissing = Type.Missing;
oWord = new Microsoft.Office.Interop.Word.Application();
oWord.Visible = false;
oWord.Documents.Open(rtffile);
string arrowpath = SMBytepath + "\\Arrow Final.png";
_ = oWord.Selection.InlineShapes.AddPicture(arrowpath).ConvertToShape().WrapFormat.AllowOverlap;
oWord.Selection.Select();
oWord.ActiveDocument.Save();
oWord.Quit();
I am using the following code where i am trying to insert an image at current position or where event the user cursor is currently there but always it insert it on top of the word document can anyone please guide the missing bit:
Microsoft.Office.Interop.Word._Application oWord;
object oMissing = Type.Missing;
oWord = new Microsoft.Office.Interop.Word.Application();
oWord.Visible = false;
oWord.Documents.Open(rtffile);
string arrowpath = SMBytepath + "\\Arrow Final.png";
_ = oWord.Selection.InlineShapes.AddPicture(arrowpath).ConvertToShape().WrapFormat.AllowOverlap;
oWord.Selection.Select();
oWord.ActiveDocument.Save();
oWord.Quit();