Position cursor at start/end of Word document

I'm not sure I'm using the same environment as you, but to go to the start or end of the document here's what works for me:

Private Sub moveCursorToStartOfDocument()
    w.Selection.HomeKey(WdUnits.wdStory, Nothing)
End Sub

Private Sub moveCursorToEndOfDocument()
    w.Selection.EndKey(WdUnits.wdStory, Nothing)
End Sub

This is how it looks in C#:

object missing = Missing.Value;
object what = Word.WdGoToItem.wdGoToLine;
object which = Word.WdGoToDirection.wdGoToLast;
doc.GoTo(ref what, ref which, ref missing, ref missing);

I guess it will be even easier in VB.Net as it supports optional parameters.


@Alexander Kojevnikov: Thanks for your help because you put me on the right track. However I found I had to apply the .GoTo to the Word Selection object, not the Document. As in:

    Dim what As Object = Word.WdGoToItem.wdGoToLine
    Dim which As Object = Word.WdGoToDirection.wdGoToLast

    //below line had no effect
    //d.GoTo(what, which, Nothing, Nothing)

    w.Selection.GoTo(what, which, Nothing, Nothing)