c# - Add lines between two inline images in word -


I have a code to add inline images to the word. Now if I want to add a line between them What should I do? var WordApp = new Microsoft.Office.Interop.Word.Application (); WordApp.Documents.Add (); WordApp.Visible = true; Microsoft.Office.Interop.Word.DocumentDoc = WordApp.ActiveDocument; doc.InlineShapes.AddPicture ("C: \\ mypic1.jpeg"); doc.InlineShapes.AddPicture ("C: \\ 20140203_202325.jpg"); Doc.SaveAs2 ("C: \\ MyDocument.doc"); WordApp.Quit (typing, type, messing, typing, messing);

I tried with the following line, but that help is needed.

  WordApp.Selection.InsertAfter ("\ r \ nThis is something Random text ");   

What would be the line between them?

Use this piece of code:

this will add the image and then Line to do it

  Object StartPos = 0; Object endpos = 1; Microsoft.Office.Interop.Word.Range rng = doc.Range (Riff Startups, RefAndo); Object Newindos = RNG Story Langha - 1; Rng = doc.Range (Ref NIndPos, Ref A New EndPoss); Rng.Select (); Var pText = doc.Paragraphs.Add (); PText.Format.SpaceAfter = 10f; PText.Range.Text = String.Format ("This is the row"); PText.Range.InsertParagraphAfter (); Object StartPos1 = 0; Object Endpos1 = 1; Microsoft.Office.Interop.Word.Range rng1 = doc.Range (Riff Startups 1, Referee Endos 1); Object NewedPos 1 = RNG Story Lang - 1; Rng1 = doc.Range (Ref NIndPos, Ref A New EndPoss); Rng1.Select (); doc.InlineShapes.AddPicture (loc + @ "\" + dt + ".jpeg");   

I hope this will help.

Comments

Popular posts from this blog

Java - Error: no suitable method found for add(int, java.lang.String) -

java - JPA TypedQuery: Parameter value element did not match expected type -

c++ - static template member variable has internal linkage but is not defined -