Hi, I am trying to automate filling text fields in a word document but when I use the following code on the fields they shift. For example if I have the following fields in word document in the same line
Date1:____ Date2:_______ Date3:___________ (end of page margin)
it becomes
Date1:____ Date2:_____ (end of page margin) Date3:_
when I use the following code
object isVisible = true;
object missing = System.Reflection.Missing.Value;
oWord.Visible = true;
oWordDoc=oWord.Documents.Open(ref fileName,
ref missing, ref missing, ref missing, ref missing, ref missing,
ref missing, ref missing, ref missing, ref missing, ref missing,
ref missing, ref missing, ref missing, ref missing, ref missing);
oWordDoc.Activate();
oWordDoc.Fields[1].Select();
oWord.Selection.TypeText(this.Date1.Text);
oWordDoc.Fields[2].Select();
oWord.Selection.TypeText(this.Date2.Text);
oWordDoc.Fields[3].Select();
oWord.Selection.TypeText(this.Date3.Text);
<br />