![]() |
Delphi7 und MSWord - word.Selection
Hallo Leute,
wenn ich via Delphi-Code im Word einen text suche und markiere - kann ich den text aus einer DB ins Word schreiben.. Wenn aber das "Feld im Word" gar nicht existiert soll kein text eingefügt werden .. ich suche so eine Art: "If word.selection.selectedText.count > 0 then ..." Jemand eine Idee? thanX Erich
Delphi-Quellcode:
...
word.Selection.Find.ClearFormatting; word.Selection.Find.Text:='<<Feld>>'; word.Selection.Find.Replacement.Text:=''; word.Selection.Find.Forward:=true; word.Selection.Find.Format:=false; word.Selection.Find.MatchCase:=false; word.Selection.Find.MatchWholeWord:=false; word.Selection.Find.MatchWildcards:=false; word.Selection.Find.MatchSoundsLike:=false; word.Selection.Find.MatchAllWordForms:=false; word.Selection.Find.Execute; word.Selection.TypeText (Text := '..wurde ersetzt' ); word.Selection.TypeParagraph; ... |
Re: Delphi7 und MSWord - word.Selection
Meinst du was was?
Delphi-Quellcode:
...
.. word.Selection.Find.Execute; if word.Selection.Find.Found then begin word.Selection.TypeText (Text := '..wurde ersetzt' ); word.Selection.TypeParagraph; end; ... |
Re: Delphi7 und MSWord - word.Selection
..genau das
.. find.found .. da muß man mal draufkommen ;-) Vielen Dank |
Re: Delphi7 und MSWord - word.Selection
Zitat:
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 09:20 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz