if (this.Sentences.Count >= 2)
{
object startLocation = this.Sentences[2].Start;
object endLocation = this.Sentences[2].End;
// Supply a Start and End value for the Range.
rng = this.Range(ref startLocation, ref endLocation);
// Select the Range.
rng.Select();
}
If Me.Sentences.Count >= 2 Then
Dim startLocation As Object = Me.Sentences(2).Start
Dim endLocation As Object = Me.Sentences(2).End
' Supply a Start and End value for the Range.
rng = Me.Range(Start:=startLocation, End:=endLocation)
' Select the Range
rng.Select()
End If
Word.Document document = this.Application.ActiveDocument;
if (document.Sentences.Count >= 2)
{
object startLocation = document.Sentences[2].Start;
object endLocation = document.Sentences[2].End;
// Supply a Start and End value for the Range.
rng = document.Range(ref startLocation, ref endLocation);
// Select the Range.
rng.Select();
}
Dim document As Word.Document = Me.Application.ActiveDocument
If document.Sentences.Count >= 2 Then
Dim startLocation As Object = document.Sentences(2).Start
Dim endLocation As Object = document.Sentences(2).End
' Supply a Start and End value for the Range.
rng = document.Range(Start:=startLocation, End:=endLocation)
' Select the Range
rng.Select()
End If