![]() |
Word: mit Ole Fußzeile erstellen
Moin moin,
Ich würde gerne über die ole Automation von Word eine Fußzeile einfügen. Ich habe mir in Word das Makro dazu aufgezeichnet, aber AttachedTemplate wird von delphi nicht erkannt ?! Weiß jemand wie man das lösen könnte ? Das Makro sieht folgendermaßen aus:
Delphi-Quellcode:
Bin für jede Hilfe dankbar :-D
WordBasic.ViewFooterOnly
ActiveDocument.AttachedTemplate.BuildingBlockEntries(" Leer").Insert Where _ :=Selection.Range, RichText:=True |
Re: Word: mit Ole Fußzeile erstellen
Delphi-Quellcode:
try
WordApplication.Connect; WordApplication.Visible:=true; WordApplication.Documents.Add(EmptyParam, EmptyParam, EmptyParam, EmptyParam); WordApplication.ActiveWindow.ActivePane.View.SeekView:=wdSeekCurrentPageFooter; WordApplication.Selection.TypeText('Dies ist meine neue Fusszeile.'); WordApplication.ActiveWindow.ActivePane.View.SeekView:=wdSeekMainDocument; finally WordApplication.Disconnect; end; |
Re: Word: mit Ole Fußzeile erstellen
oder evtl. so: OleVariant(ActiveDocument).AttachedTemplate....
|
Re: Word: mit Ole Fußzeile erstellen
Super vielen Dank !!! :thumb: :thumb: :thumb:
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 19:38 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