Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Object-Pascal / Delphi-Language (https://www.delphipraxis.net/32-object-pascal-delphi-language/)
-   -   Delphi Drucker für Excel einstellen (https://www.delphipraxis.net/89011-drucker-fuer-excel-einstellen.html)

Elspass 24. Mär 2007 17:11


Drucker für Excel einstellen
 
Moin, Moin,

ich könnte Hilfe gebrauchen. Ich möchte eine Excel-Datei per OLE bearbeiten und ausdrucken.
Soweit kein Problem, aber den Drucker würde ich gerne auswählen... Wie funzt das?

Gruß Jörg

Delphi-Quellcode:
begin
  try
    Excel := CreateOleObject ( 'Excel.Application' );
  except
    ShowMessage ( 'Excel konnte nicht gestartet werden!' );
    Exit;
  end;

  Excel.Workbooks.Open ( 'c:\Datei.xls' );

  Excel.Cells[2,2].Value := "Test");

  Excel.ActiveWorkBook.PrintOut;

pilic 24. Mär 2007 17:32

Re: Drucker für Excel einstellen
 
Hi,

ich hab hier im MSDN etwas gefunden. PrintOut

Elspass 24. Mär 2007 17:40

Re: Drucker für Excel einstellen
 
Vielen Dank!

Delphi-Quellcode:
Excel.ActiveWorkBook.PrintOut (1, 2, 1, false, 'Samsung CLP510N', false, false);


Alle Zeitangaben in WEZ +1. Es ist jetzt 01:49 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz