PPT打印省纸法及改变ppt背景

来源:互联网 发布:股票资金曲线图软件 编辑:程序博客网 时间:2024/04/28 18:40

1. 打开ppt,将即将打印的部分编辑好,再 另存为—>文件格式请选择windows 图元文件,保存好即可!

2.打开word使用word的宏,编辑这些图片的宏代码:
1    点击工具”—>“”—>“
2    其一个自己容易记住的名字,创建一个新宏
3    请把下面的内容复制到里面,然后保存(可直接点关闭)

Dim i As Integer

For i = 1 To ActiveDocument.InlineShapes.Count

    ActiveDocument.InlineShapes(i).Height = 170 * 1.1

    ActiveDocument.InlineShapes(i).Width = 225 * 1.2

Next i
然后新建word文件,进行页面设置,如下图:

1

2


3)导入文件

    点击“插入”——“图片”——“文件”,选择刚保存的图元文件。  注意顺序,最好就是先点第一张,然后ctrl+a  “打开”

4)转化

点击工具”—>“”—>“,找到你刚才保存的宏文件,点击运行

保存即可。

更具体的宏代码:

Sub PPT()Dim i As IntegerFor i = 1 To ActiveDocument.InlineShapes.Count    ActiveDocument.InlineShapes(i).Height = 170 * 1.1    ActiveDocument.InlineShapes(i).Width = 225 * 1.2Next iEnd SubSub ppt加边框()With ActiveDocument.Styles(wdStyleNormal).Font        If .NameFarEast = .NameAscii Then            .NameAscii = ""        End If        .NameFarEast = ""    End With    With ActiveDocument.PageSetup        .LineNumbering.Active = False        .Orientation = wdOrientPortrait        .TopMargin = CentimetersToPoints(1.6)        .BottomMargin = CentimetersToPoints(0.9)        .LeftMargin = CentimetersToPoints(1.4)        .RightMargin = CentimetersToPoints(1)        .Gutter = CentimetersToPoints(0)        .HeaderDistance = CentimetersToPoints(0.5)        .FooterDistance = CentimetersToPoints(0.9)        .PageWidth = CentimetersToPoints(21)        .PageHeight = CentimetersToPoints(29.7)        .FirstPageTray = wdPrinterDefaultBin        .OtherPagesTray = wdPrinterDefaultBin        .SectionStart = wdSectionNewPage        .OddAndEvenPagesHeaderFooter = False        .DifferentFirstPageHeaderFooter = False        .VerticalAlignment = wdAlignVerticalTop        .SuppressEndnotes = False        .MirrorMargins = False        .TwoPagesOnOne = False        .BookFoldPrinting = False        .BookFoldRevPrinting = False        .BookFoldPrintingSheets = 1        .GutterPos = wdGutterPosLeft        .LayoutMode = wdLayoutModeLineGrid    End With'【加页码,页脚居中处】        Selection.Sections(1).Footers(1).PageNumbers.Add PageNumberAlignment:= _        wdAlignPageNumberCenter, FirstPage:=True    If ActiveWindow.View.SplitSpecial <> wdPaneNone Then        ActiveWindow.Panes(2).Close    End If    If ActiveWindow.ActivePane.View.Type = wdNormalView Or ActiveWindow. _        ActivePane.View.Type = wdOutlineView Then        ActiveWindow.ActivePane.View.Type = wdPrintView    End If    ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader    If Selection.HeaderFooter.IsHeader = True Then        ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageFooter    Else        ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader    End If    If ActiveWindow.ActivePane.View.Type = wdNormalView Or ActiveWindow. _        ActivePane.View.Type = wdOutlineView Then        If ActiveWindow.Panes.Count = 2 Then            ActiveWindow.Panes(2).Close        End If        ActiveWindow.View.SplitSpecial = wdPaneCurrentPageHeader    Else        ActiveWindow.View.SeekView = wdSeekCurrentPageHeader    End If    ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument    ActiveWindow.ActivePane.VerticalPercentScrolled = 0    '【调整每张幻灯片的大小为高184宽262,也许还有更佳的值,可自己尝试】        Dim i As Integer    For i = 1 To ActiveDocument.InlineShapes.Count        ActiveDocument.InlineShapes(i).Height = 184        ActiveDocument.InlineShapes(i).Width = 262    Next i    '【给每张幻灯片加边框,感觉没有边框很难看】        Selection.HomeKey Unit:=wdStory        Dim j As Integer    For j = 1 To ActiveDocument.InlineShapes.Count           Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend    With Selection.InlineShapes(1)        With .Borders(wdBorderLeft)            .LineStyle = wdLineStyleSingle            .LineWidth = wdLineWidth050pt            .Color = wdColorAutomatic        End With        With .Borders(wdBorderRight)            .LineStyle = wdLineStyleSingle            .LineWidth = wdLineWidth050pt            .Color = wdColorAutomatic        End With        With .Borders(wdBorderTop)            .LineStyle = wdLineStyleSingle            .LineWidth = wdLineWidth050pt            .Color = wdColorAutomatic        End With        With .Borders(wdBorderBottom)            .LineStyle = wdLineStyleSingle            .LineWidth = wdLineWidth050pt            .Color = wdColorAutomatic        End With        .Borders.Shadow = False    End With    With Options        .DefaultBorderLineStyle = wdLineStyleSingle        .DefaultBorderLineWidth = wdLineWidth050pt        .DefaultBorderColor = wdColorAutomatic    End With            Selection.MoveRight Unit:=wdCharacter, Count:=1    Next jEnd Sub

改变ppt背景方法:

改为黑白背景便于打印:

视图 - 母版 - 幻灯片母版 - 将旧的母版全删掉,新建新i空白母版,背景就会变白。

原创粉丝点击