Autor Beitrag
svenson08
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 87



BeitragVerfasst: Fr 25.11.05 09:04 
Hallo,

ich bin am verzweifeln. Ich will ein Worddokument aus drucken, jedoch mit der angaben von<->bis welcher seite.
das drucken des gesamten dokuments funktioniert mit

ausblenden Delphi-Quelltext
1:
DM_Main.WordDocument.PrintOut(Background)					


Wenn ich jetzt aber angeben will von welcher Seite bi zu welcher Seite ich drucken will dachte ich das es so funktionieren müsste

ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
procedure Druck;
var Background, FromPage,ToPage : OleVariant
begin
 Backgound := False;
 FromPage  := 2;
 ToPage    := 4;
 DM_Main.WordDocument.PrintOut(Background, // Background.
                                EmptyParam, // Append.
                                EmptyParam,//
                                EmptyParam, // Range.
                                EmptyParam, // OutputFileName.
                                FromPage, // // From.
                                ToPage, // // To.
                                EmptyParam, // Item.
                                EmptyParam, // Copies.
                                EmptyParam, // Pages.
                                EmptyParam, // PageType.
                                EmptyParam, // PrintToFile.
                                EmptyParam, // Collate.
                                EmptyParam, // ActivePrinterMacGX.
                                EmptyParam, // ManualDuplexPrint.
                                EmptyParam, // PrintZoomColumn New with Word 2002
                                EmptyParam, // PrintZoomRow ditto
                                EmptyParam // PrintZoomPaperWidth ditto
                                );
end;


Jedoch erhalte ich dann einen Typkonflikt beim ausführen. Ich hab keine Ahnung wieso.

Hoffe jemand kann mir helfen. Hab über das Thema leider keine Thread gefunden, der auch das drucken von<->bis Seite behandelt hat

Gruß
Sascha

Moderiert von user profile iconTino: Code- durch Delphi-Tags ersetzt
Keldorn
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 2266
Erhaltene Danke: 4

Vista
D6 Prof, D 2005 Pro, D2007 Pro, DelphiXE2 Pro
BeitragVerfasst: Fr 25.11.05 19:37 
Hallo

innerhalb deiner Printout-methode bei einer Emptyparam Strg+Leertaste drücken, und deine Übergaben vergleichen. Deine Reihenfolge/Zuordnung stimmt nämlich nicht.
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
 WordApplication1.ActiveDocument.PrintOut(Background, // Background.
                                EmptyParam, // Append.
                                EmptyParam, // Range.
                                EmptyParam, // OutputFileName.
                                FromPage, // // From.
                                ToPage, // // To.
                                EmptyParam, // Item.
                                EmptyParam, // Copies.
                                EmptyParam, // Pages.
                                EmptyParam, // PageType.
                                EmptyParam, // PrintToFile.
                                EmptyParam, // Collate.
                                EmptyParam, // ActivePrinterMacGX.
                                EmptyParam, // ManualDuplexPrint.
                                EmptyParam, // PrintZoomColumn New with Word 2002
                                EmptyParam, // PrintZoomRow ditto
                                EmptyParam, // PrintZoomPaperWidth ditto
                               EmptyParam// PrintZoomPaperheight ditto 
                                );


Mfg Frank

_________________
Lükes Grundlage der Programmierung: Es wird nicht funktionieren.
(Murphy)