Autor Beitrag
Christoph Englmann
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 276



BeitragVerfasst: Do 12.05.05 13:23 
hallo,

wie kann ich von delphi aus die fusszeile eines dokumentes ansprechen und dort in eine bestimmte zeile/spalte einen wert eintragen?

danke
christoph
stifflersmom
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 194

XP /XP PRO/ SuSE div.
D1 - D7, BDS 2006
BeitragVerfasst: Do 12.05.05 14:12 
user profile iconChristoph Englmann hat folgendes geschrieben:
hallo,

wie kann ich von delphi aus die fusszeile eines dokumentes ansprechen und dort in eine bestimmte zeile/spalte einen wert eintragen?

danke
christoph


Hallo,

ich würde in das Dokument ein "Textformularfeld" einfügen, ihm einen Namen geben und dann per:

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
try
    Word := CreateOleObject('Word.Application');
  except
    ShowMessage('Kann Word nicht starten !');
    Exit;
  end;

   Word.Documents.Open('deinworddokument');

   Word.Visible := True;

   Word.ActiveDocument.FormFields.Item('deintextformularfeld').Result :=
   'Dein einzusetzender Wert';


Word ist eine Variable vom Typ: OLEVariant.

Als Unit brauchst DU: ComObj

Das war's

Moin

Moderiert von user profile iconraziel: Code- durch Delphi-Tags ersetzt.
Christoph Englmann Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 276



BeitragVerfasst: Do 12.05.05 17:54 
hallo,

danke für den tip...aber das mit dem textfeld ist mir schon klar (hab ich auch schon oft gemacht...)
Ich will aber in eine fußzeile eines dokumentes was reinschreiben und in eine kopf oder fusszeile kann man eben kein e textfelder einbetten.... das ist ja mein problem...

christoph
Keldorn
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 2266
Erhaltene Danke: 4

Vista
D6 Prof, D 2005 Pro, D2007 Pro, DelphiXE2 Pro
BeitragVerfasst: Do 12.05.05 18:03 
Hallo

schon ein makro aufgezeichnet und geguggt was Word genau macht?

Mfg Frank

_________________
Lükes Grundlage der Programmierung: Es wird nicht funktionieren.
(Murphy)