Einzelnen Beitrag anzeigen

JamDave

Registriert seit: 14. Apr 2011
3 Beiträge
 
#2

AW: Wie OleObject in OleContainer bearbeiten?

  Alt 14. Apr 2011, 14:34
Habs was gefunden.

Code:
procedure TForm3.PageControl1Change(Sender: TObject);
var Document: _Document;
    Word: _Application;
begin
  if PageControl1.ActivePageIndex = 1 then
  begin

  FContainer := TOleContainer.Create(self);
  FContainer.Modified := false;
  FContainer.Parent := PageControl1.Pages[1]; // Normales TPanel
  FContainer.Align := alClient;
  FContainer.CreateObject('Word.Document', true);
  Document := IDispatch(FContainer.OleObject) as _Document;
  Word := Document.Application;
  FContainer.DoVerb(ovShow);...
  Mit Zitat antworten Zitat