Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Delphi Navigation in Word (https://www.delphipraxis.net/58398-navigation-word.html)

blackfoxx 6. Dez 2005 15:51


Navigation in Word
 
Hi Leute..

Ich hab ein kleines Problem beim Zugriff auf Word.
Ich spreche Word über ein Ole Objekt an, öffne ein bestimmtes Dokument und schreibe etwas hinein. Das Problem liegt nun darin, dass in meinem Dokument bereits etwas steht und ich an ende des Dokumentes will.

Also hab ich den Makro-Editor angeworfen und Strg+Ende gedrückt. Das Ergebnis war
Delphi-Quellcode:
EndKey Unit:=wdstory;
Das habe ich nun versucht so
Delphi-Quellcode:
WordApp.Selection.EndKey(wdstory);
eingebunden. Aber das funzt nicht!!!!


Könnt ihr mir sagen, wie ich den Parameter dran hängen kann, ohne dass er mir eine Fehlermeldung bringt?

Jelly 6. Dez 2005 16:00

Re: Navigation in Word
 
Probier mal so:

Delphi-Quellcode:
WordApp.Selection.EndKey(Unit := wdstory);

blackfoxx 6. Dez 2005 16:04

Re: Navigation in Word
 
hab ich auch schon probiert..

funzt auch nich.. :(

blackfoxx 7. Dez 2005 13:23

Re: Navigation in Word
 
Ich hab das Problem gelöst..
Die Lösung:
Delphi-Quellcode:
Selection.EndKey(6);
wobei die 6 als Wert für "wdStory" steht.
Gefunden hab ich das ganze hier.

Falls jemand mal das gleiche Problem hat.

Greetz BlackFoXX


Alle Zeitangaben in WEZ +1. Es ist jetzt 11:54 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz