hallo,
ich habe eine powerpoint praesentation mit einer grafik, der ich ein makro einfuege. wenn die grafik angeklickt wird kommt das druck menue.das problem ist ich kann die aktuelle seite nicht drucken weil das feld nicht aktiviert ist.
habe win xp.wie kann ich das fenster aktuelle seite aktivieren.
hier das script:
Sub druck()
Dim flg As Long
Dim act As Long
On Error GoTo CancelWasPressed
With UserForm1.CommonDialog1
.CancelError = True
.Min = 1
.Max = Application.ActivePresentation.Slides.Count
.Flags = &H10
.ShowPrinter
flg = .Flags
End With
With ActivePresentation.PrintOptions
.NumberOfCopies = UserForm1.CommonDialog1.Copies
.Collate = ((flg And &H10) <> 0)
Select Case flg And 3
Case 0
.RangeType = ppPrintAll
Case 1
.RangeType = ppPrintSlideRange
.Ranges.ClearAll
.Ranges.Add act, act
Case 2
.RangeType = ppPrintSlideRange
.Ranges.ClearAll
act = ActivePresentation.Windows(1).Selection.SlideRange.SlideNumber
.Ranges.Add UserForm1.CommonDialog1.FromPage, UserForm1.CommonDialog1.ToPage
End Select
.OutputType = ppPrintOutputSlides
.PrintHiddenSlides = msoTrue
.PrintColorType = ppPrintBlackAndWhite
.FitToPage = msoFalse
.FrameSlides = msoFalse
End With
ActivePresentation.PrintOut
CancelWasPressed:
End Sub
danke
luj
ich habe eine powerpoint praesentation mit einer grafik, der ich ein makro einfuege. wenn die grafik angeklickt wird kommt das druck menue.das problem ist ich kann die aktuelle seite nicht drucken weil das feld nicht aktiviert ist.
habe win xp.wie kann ich das fenster aktuelle seite aktivieren.
hier das script:
Sub druck()
Dim flg As Long
Dim act As Long
On Error GoTo CancelWasPressed
With UserForm1.CommonDialog1
.CancelError = True
.Min = 1
.Max = Application.ActivePresentation.Slides.Count
.Flags = &H10
.ShowPrinter
flg = .Flags
End With
With ActivePresentation.PrintOptions
.NumberOfCopies = UserForm1.CommonDialog1.Copies
.Collate = ((flg And &H10) <> 0)
Select Case flg And 3
Case 0
.RangeType = ppPrintAll
Case 1
.RangeType = ppPrintSlideRange
.Ranges.ClearAll
.Ranges.Add act, act
Case 2
.RangeType = ppPrintSlideRange
.Ranges.ClearAll
act = ActivePresentation.Windows(1).Selection.SlideRange.SlideNumber
.Ranges.Add UserForm1.CommonDialog1.FromPage, UserForm1.CommonDialog1.ToPage
End Select
.OutputType = ppPrintOutputSlides
.PrintHiddenSlides = msoTrue
.PrintColorType = ppPrintBlackAndWhite
.FitToPage = msoFalse
.FrameSlides = msoFalse
End With
ActivePresentation.PrintOut
CancelWasPressed:
End Sub
danke
luj