找回密码
 立即注册
搜索
123
返回列表 发新帖
楼主: a616879579

请教关于ppt每页A4打印6张幻灯片并且双面打印的问题

21
回复
3299
查看
[复制链接]

11

主题

208

帖子

31

幻币

一流武者

Rank: 3Rank: 3

积分
252
QQ
2016-4-12 16:42:09 显示全部楼层
Sub 可彩色可连续页码打针()
Dim i As Long
Dim lStart As Long
Dim lStop As Long
Dim lHandoutKind As Long
Dim lSlide As Long
Dim lSlideEnd As Long
Dim ppHandoutKind As PpPrintOutputType
Dim vbConfirm As VbMsgBoxResult
'
lSlide = InputBox("从哪一张幻灯片开始打印?", "开始幻灯片", "1")
'
lStart = InputBox("讲义起始页码编号: ", "讲义起始页码", "1")
'
lHandoutKind = InputBox("每页几张幻灯片?" & vbNewLine & "2, 3, 4, 6, 9?", "讲义打印类型", "4")
'
Select Case lHandoutKind
Case 1, 2
ppHandoutKind = ppPrintOutputTwoSlideHandouts
lHandoutKind = 2
Case 3
ppHandoutKind = ppPrintOutputThreeSlideHandouts
lHandoutKind = 3
Case 4
ppHandoutKind = ppPrintOutputFourSlideHandouts
lHandoutKind = 4
Case 5, 6
ppHandoutKind = ppPrintOutputSixSlideHandouts
lHandoutKind = 6
Case Else
ppHandoutKind = ppPrintOutputNineSlideHandouts
lHandoutKind = 9
End Select
'
vbConfirm = MsgBox("You have chosen to print " & lHandoutKind & "-up handouts, starting at page " & lStart & vbNewLine & " and slide number " & lSlide & ".", vbOKCancel)
'
If vbConfirm = vbOK Then
'
lStop = Round((ActivePresentation.Slides.Count - (lSlide - 1)) / lHandoutKind)
If Round((ActivePresentation.Slides.Count - (lSlide - 1)) Mod lHandoutKind) <= (lHandoutKind / 2) Then
lStop = lStop + 1
End If
'
For i = 1 To lStop
'
ActivePresentation.NotesMaster.HeadersFooters.SlideNumber.Visible = msoFalse
ActivePresentation.HandoutMaster.Shapes(4).TextFrame.TextRange.Text = lStart
lStart = lStart + 1
'
With ActivePresentation.PrintOptions
'
.RangeType = ppPrintSlideRange
With .Ranges
'
.ClearAll
'
lSlideEnd = lSlide + lHandoutKind - 1
'
If lSlide > ActivePresentation.Slides.Count Then
lSlide = ActivePresentation.Slides.Count
End If
If lSlideEnd > ActivePresentation.Slides.Count Then
lSlideEnd = ActivePresentation.Slides.Count
End If
.Add Start:=lSlide, End:=lSlideEnd
lSlide = lSlide + lHandoutKind
End With
'
' Set number of copies to 1.
'
.NumberOfCopies = 1
'
.OutputType = ppHandoutKind
'
.HandoutOrder = ppPrintHandoutVerticalFirst
End With
'
ActivePresentation.PrintOut
Next i
End If
'
ActivePresentation.HandoutMaster.Shapes(4).TextFrame.TextRange.Text = &quot;&quot;
ActivePresentation.NotesMaster.HeadersFooters.SlideNumber.Visible = msoTrue
end sub
PPT学习论坛
回复 支持 反对

使用道具 举报

12

主题

216

帖子

39

幻币

一流武者

Rank: 3Rank: 3

积分
256
QQ
2016-4-12 16:47:51 显示全部楼层
你这个可以双面打印、每页6屏?
比如效果是:纸正面是1-6屏,背面是7-12屏,以此类推。
PPT学习论坛
回复 支持 反对

使用道具 举报

123
您需要登录后才可以回帖 登录 | 立即注册