• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1392
  • Last Modified:

Open word,excel within delphi form in readonly mode

Hi experts,
I need fast solution how to open word(*.doc) and excel (*.xls) file in my delphi form. Right now I used EmbeddedWB component to open it. But it doesn't restrict user to make any change in that document. So .., every time I navigate to "about:blank" there will be always a pop up message that ask should it to be save or not, and off course I don't want it showed.
So anyone can help me??

Regards,
0
matelindonesia
Asked:
matelindonesia
  • 2
  • 2
  • 2
1 Solution
 
2266180Commented:
0
 
geobulCommented:
Hello,

You may try OleContainer component:

type
  TForm1 = class(TForm)
    oc: TOleContainer;
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.DFM}

procedure TForm1.Button1Click(Sender: TObject);
begin
  oc.CreateObjectFromFile('c:\test.doc', false);
  oc.DoVerb(ovShow);
end;

Regards, Geo
0
 
matelindonesiaAuthor Commented:
TOleContainer? -> in which component tab i can pickup from ?
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
2266180Commented:
that would be the system tab
0
 
matelindonesiaAuthor Commented:

yes it works, but how I can hide the native office tool bar?

thanks
0
 
geobulCommented:
Hi,

Save button is disabled here and any changes in the document cannot be saved. Is it the same at your side?

Regards, Geo
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 2
  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now