Home > Back-end >  How to display access the word document in delphiXE
How to display access the word document in delphiXE

Time:10-09

Excuse me how to display in the delphiXE word document deposited in the access database, thank you!

CodePudding user response:

Supplement: delphiXE if there is no OleContaine controls?
If not, how to display in the delphiXE deposited in the access in the form of word document?
Thank you directly!

CodePudding user response:

Supplement: delphiXE if there is no OleContaine controls?
If not, how to display in the delphiXE deposited in the access in the form of word document?
Thank you directly!

CodePudding user response:

I'm sorry! Found OleContaine controls in the system, but the following code, perform to OleContainer1. LoadFromStream (Ms). , show: "Invalid stream format", please tell me how to modify the format, get the correct flow

Procedure TForm1. Button4Click (Sender: TObject);
Var
Ms: TMemoryStream;
The begin
Adoquery1. Close;
Adoquery1. SQL. The Clear;
Adoquery1. SQL. The Add (' select * from table 1 ');
Adoquery1. Open;
Ms:=TMemoryStream. Create;
TBlobField (adoquery1 FieldByName (' WordFile). SaveToStream (Ms).
Ms. Position:=0;
OleContainer1. LoadFromStream (Ms);
OleContainer1. DoVerb (ovPrimary);
end;

CodePudding user response:

Not clear, but Trichview controls with which you can achieve this function

CodePudding user response:

Set up the correct field, can use the image type, so that it can be a query shows,

CodePudding user response:

Why he should put the word document to access inside, can't you keep a link, save the speed, moreover if word document a lot, your access to large volume is small
  • Related