Hi,
Anton_erhard schrieb:
Von Anton Erhard

Hallo,
wenn ich mit folgendem Basic-Code im Writer (Office 2,4 oder auch Office
3.0)

function gehezu(Marke as string,Einfuegung as string)

dim oBookmark as object
dim oCur as object
dim textmarke as string

on error goto ErrorHandler
oBookmark=ActiveDocument.getBookmarks().getByName(Marke)

Rem ActiveDocument ist als globales Objekt definiert.

textmarke=oBookmark.Name
oCur=ActiveDocument.Text.createTextCursorbyRange(oBookmark.getAnchor().getEn
d())
Der Cursor kann nur an dem Text erzeugt werden, in dem auch der TextRange steht. Also:

xrange = oBookmark.getAnchor().getEnd()
oCur=xrange.gettext().createTextCursorbyRange(xrange)

Gruß,Oliver

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Antwort per Email an