![]() |
Problem mit Ole Formatvorlage
Hi,
wie kann ich denn einem in einem Word Dokument erstellten Text sagen, dass er jetzt eine Überschrift ist?
Delphi-Quellcode:
Da bekomme ich die Fehlermeldung: Styles ist keine Methode. Im Macro läufts aber doch genauso:gruebel:
doc := WordApp.ActiveDocument;
WordApp.Selection.TypeParagraph; WordApp.Selection.TypeText (Text := 'Test' ); WordApp.Selection.Style := doc.Styles('Überschrift 1'); Viele Grüße ... |
AW: Problem mit Ole Formatvorlage
versuch es mal mit
Code:
Gruß
.Styles(name:="Überschrift 1")
K-H |
AW: Problem mit Ole Formatvorlage
Hi,
klappt auch nicht: Zitat:
|
AW: Problem mit Ole Formatvorlage
Ich hab da noch etwas gefunden:
Zitat:
Zitat:
K-H |
AW: Problem mit Ole Formatvorlage
Hi,
danke für deine Antwort. Leider funktioniert das nicht (Paragraphs ist keine Methode). Ich frage mich langsam, ob das überhaupt geht :? - da, im Netz gibts zu dem Thema gar nix. Viele Grüße ... |
AW: Problem mit Ole Formatvorlage
Zitat:
Schau mal was da sinnvoll sein könnte. Gruß K-H |
AW: Problem mit Ole Formatvorlage
Delphi-Quellcode:
doc := WordApp.ActiveDocument;
WordApp.Selection.TypeParagraph; WordApp.Selection.TypeText (Text := 'Test' ); Style := WordApp.ActiveDocument.Styles.Item(wdStyleHeading1); WordApp.Selection.Style := Style; |
Alle Zeitangaben in WEZ +1. Es ist jetzt 09:19 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