.net - Position cursor at start/end of Word document -
We are connecting Word 2007 documents to .NET using Word Interop. Most of the fields are doing stuff like:
field with d.Fields f.Select () // field for each F here next
< P> This leaves the last field in the selected document Therefore, for cleanliness, we want to position the cursor on end of the document (or start Will also be fine).
Googling does not throw much for the answer ... The closest I can find is that we need to include ourselves with categories or bookmarks. There is a GoTo method for document objects but none of the WdGoToItem options are available.
Is there no easy way to send the cursor to the end (or start) of the document?
Edit
was part of my problem. I did not like to leave the last area selected. Now I realized that I wanted to remove the merge. / P>
f.Unlink
and just leave the field text in plain text. Whether it is a picker or not, we also restore the cursor
@ Alexander Kozenvinov: help you Thank you for because you kept me on the right track though I found out that I had to implement the .GoTo for the word selection object, not the document. As::
slow what object = wd .wdGoToItem.wdGoToLine Dim which as an object = Word.WdGoToDirection.wdGoToLast // The bottom line had no effect //d.GoTo (which , Which, nothing, nothing). Election. Go (what, that, nothing, nothing)
Comments
Post a Comment