Move my cursor to the end of the Text in MsWord using C#?
c#, ms-word, visual-studio
Solution
Well thank you all for your response I seem to have figured out a simple Solution.I tried to modify Hassan's Solution.There might be a much easier approach but as of now I have Found This
object NewEndPos = rng.StoryLength-1;
rng = oDoc.Range(ref NewEndPos, ref NewEndPos);
rng.Select();
Problem
This question might sound very simple but I am unable to find any Solution for it.What I am trying to do is to Move my Cursor Positon in MsWord to the end of the text.My code is as follows ``` object StartPos = 0; object Endpos = 1; Microsoft.Office.Interop.Word.Range rng= oDoc.Range(ref StartPos, ref Endpos); rng.Text = "This is first line Word from C#"; ``` The output is I This is first line Word from C# however i want something like this This is first line Word from C# I Thanks All