Autor Beitrag
Maa83
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 160

Win XP Pro
D6 Ent
BeitragVerfasst: Do 28.06.07 10:36 
Hallole,

IST-Zustand:
Ich habe in einer SQL-Datenbank ein Blob-Feld das ein Word-Dokument enthält.

Soll-Zustand:
Text des Doc-Files soll ein Rückgabeparameter einer Funktion werden. Wenn möglich mit einfachen Formatierungen wie Zeilenabstand o.ä. wenn keine Formatierungen möglich dann halt nicht.



Das Blob-Feld kann ich auslesen und als DOC-Dokument speichern. Gibt es nun die Möglichkeit Word im hintergrund zu öffnen den Text im Dokument zu kopieren und diesen dann einfach aus dem Clipboard auszulesen?
Am liebsten wäre es mir wenn ich nicht mal die DOC-Datei auf Platte ablegen muss wäre aber möglich.

Hoffe ihr könnt mir helfen.
Maa83 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 160

Win XP Pro
D6 Ent
BeitragVerfasst: Mo 02.07.07 11:36 
hat keiner eine Idee?
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Mo 02.07.07 11:58 
-Welches DBMS?
-Ist Word o.ä. auf dem Rechner installiert?

_________________
Markus Kinzler.
Maa83 Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 160

Win XP Pro
D6 Ent
BeitragVerfasst: Mo 02.07.07 15:23 
Word ist installiert.

dbms? Datenbank? Microsoft SQL-Server 2000


Also im Moment schreibe ich mit Hilfe von ADO den Text auf die Platte

TBlobField(ado_tmp.FieldByname('TEXT')).SaveToFile(sPfadKomplett);

_Wordapp := TWordApplication.Create(NIL);
_Wordapp.WindowState := wdWindowStateMinimize;

WordDoc := TWordDocument.Create(NIL);

Doc := _Wordapp.Documents.Open(sPfadKomplett, EmptyParam, TRUE, EmptyParam, EmptyParam,EmptyParam, EmptyParam, EmptyParam, EmptyParam, EmptyParam);
WordDoc.Connectto(Doc);

HIER DEN TEXT AUSLESEN! WIE?

Danach Worddoc disconnection und Schließen.
mkinzler
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 4106
Erhaltene Danke: 13


Delphi 2010 Pro; Delphi.Prism 2011 pro
BeitragVerfasst: Mo 02.07.07 16:08 

_________________
Markus Kinzler.