Delphi-PRAXiS
Seite 2 von 2     12   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   OLE in Office 365 (Word) (https://www.delphipraxis.net/195918-ole-office-365-word.html)

hoika 10. Apr 2018 19:13

AW: OLE in Office 365 (Word)
 
Hallo,
Zitat:

(In der Firma habe ich Office 2016 und zuhause Office 365 - ich habe noch keinen Unterschied bemerkt.)
Das ist doch mal eine Aussage.
Danke.

hoika 10. Apr 2018 19:16

AW: OLE in Office 365 (Word)
 
Hallo,
also der Hauptcode ist das hier
Delphi-Quellcode:
      WordApp.Selection.Find.ClearFormatting;
      WordApp.Selection.Find.Replacement.ClearFormatting;
      WordApp.Selection.Find.Text:= SL_Search[iString];
      WordApp.Selection.Find.Replacement.Text := SL_Replace[iString];
      WordApp.Selection.Find.Forward := True;
      WordApp.Selection.Find.Wrap := wdFindContinue;
      WordApp.Selection.Find.Format := False;
      WordApp.Selection.Find.MatchCase := False;
      WordApp.Selection.Find.MatchWholeWord := False;
      WordApp.Selection.Find.MatchWildcards := False;
      WordApp.Selection.Find.MatchSoundsLike := False;
      WordApp.Selection.Find.MatchAllWordForms := False;

      if not WordApp.Selection.Find.Execute(Replace:= wdReplaceAll) then
      begin
        //iDummy := 1;
      end;
Also mit einer Selection.
Wie würde es dann mit einer Range aussehen?
Laut dem hier dienen Ranges nur zum Suchen
https://msdn.microsoft.com/de-de/library/f1f367bx.aspx

Wobei hier mir Ranges versucht wurde, zu arbeiten wurde:
https://www.experts-exchange.com/que...th-Delphi.html

Und das sieht schon mal ganz gut aus.
http://rxkinetics.com/blog/?p=353

p80286 10. Apr 2018 21:50

AW: OLE in Office 365 (Word)
 
Ich hab leider kein Word mehr zur Hand darum ohne Gewähr, der letzte Link sieht ganz gut aus. Aber teste doch erst einmal die ganze Sache als Word-Macro und übernimm es dann nach Delphi.

Gruß
K-H


Alle Zeitangaben in WEZ +1. Es ist jetzt 13:48 Uhr.
Seite 2 von 2     12   

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