Home > Back-end >  DELPHI word and operation
DELPHI word and operation

Time:11-08

I want to prepare an interface, by clicking on the corresponding operation, open a word or Execl documents, document embedded in current yes interface, the document does not allow the operation, are not allowed to save, and also not allowed to copy and paste (Ctrl + C), allowed to scroll up and down, development is the DEMO), can use the free third party controls, is there any one can help me, thank you.

CodePudding user response:

D7 DEMO in OLE in a program, as can be, and don't have Delphi7,

CodePudding user response:

To open read-only, use system hook shielding CTRL + C, CTRL + V

CodePudding user response:

Dsoframer. Ocx can meet your requirements,

CodePudding user response:

Open the excel with F1Book control operation control problem

CodePudding user response:

 
OleContainer: TOleContainer;
.
FileName:='PDF' D: \ Test.
Ext:=LowerCase (ExtractFileExt (FileName));
OleContainer. CreateObjectFromFile (FileName, False);
OleContainer. DoVerb (ovPrimary);
If (Ext='doc') or (Ext='docx') then
OleContainer. OleObject. Application. The ActiveDocument. Protect (2)
The else
OleContainer. OleObject. Application. ActiveSheet. Protect;
OleContainer.OleObject.application.Com mandBars [' Standard ']. Visible:=False;
OleContainer.OleObject.application.Com mandBars [' Formatting]. Visible:=False;
OleContainer.OleObject.application.Com mandBars [' Reviewing ']. Visible:=False;

CodePudding user response:

 
OleContainer: TOleContainer;
.
FileName:='D: \ Test. Doc;
Ext:=LowerCase (ExtractFileExt (FileName));
OleContainer. CreateObjectFromFile (FileName, False);
OleContainer. DoVerb (ovPrimary);
If (Ext='doc') or (Ext='docx') then
OleContainer. OleObject. Application. The ActiveDocument. Protect (2)
The else
OleContainer. OleObject. Application. ActiveSheet. Protect;
OleContainer.OleObject.application.Com mandBars [' Standard ']. Visible:=False;
OleContainer.OleObject.application.Com mandBars [' Formatting]. Visible:=False;
OleContainer.OleObject.application.Com mandBars [' Reviewing ']. Visible:=False;
  • Related