本文介绍了400名员工的水印宏的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好

我目前在word 2013中设置一个标签,其中包含众多宏,以便所有员工快速输入他们需要什么法律文件。

I am currently setting up a tab in word 2013 that houses numerous macros to enable all staff to quickly enter what they need into legal documents.

然而,我在插入水印方面遇到了很大困难。一旦我关闭模板,宏就会中断。这是我到目前为止的一个例子。水印是一张图片,保存在所有工作人员都可以访问的文件夹中。以下宏应该
将PREP作为水印。

I am however, having huge difficulty with inserting watermarks. As soon as I close the template down the macro breaks. This is an example of what I have so far. The watermark is an image, saved in a folder all staff have access to. The following macro should place PREP as a watermark.

Sub PREP()

'

'PREP Macro

'¥b $ b'

    ActiveDocument.Sections(1).Range.Select

    ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader

    Selection.HeaderFooter.Shapes(" WordPictureWatermark")。选择

    Selection.Delete

    ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument

    ActiveDocument.Sections(1).Range.Select

    ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader

    Selection.HeaderFooter.Shapes.AddPicture(文件名:= _

       " E:\IT\MS办公室2013\PREP水印.PNG" ;, LinkToFile:=假,_

        SaveWithDocument:= TRUE)。选择

 &NBSP ;  Selection.ShapeRange.Name =" WordPictureWatermark"

    Selection.ShapeRange.PictureFormat.Brightness = 0.5

    Selection.ShapeRange.PictureFormat.Contrast = 0.5

    Selection.ShapeRange.LockAspectRatio = True

    Selection.ShapeRange.Height = CentimetersToPoints(14.34)

    Selection.ShapeRange.Width = CentimetersToPoints(15.92)

    Selection.ShapeRange.WrapFormat.AllowOverlap = True

    Selection.ShapeRange.WrapFormat.Side = wdWrapNone

    Selection.ShapeRange.WrapFormat.Type = 3

    Selection.ShapeRange.RelativeHorizo​​ntalPosition = _

        wdRelativeVerticalPositionMargin

    Selection.ShapeRange.RelativeVerticalPosition = _

        wdRelativeVerticalPositionMargin

    Selection.ShapeRange.Left = wdShapeCenter

    Selection.ShapeRange.Top = wdShapeCenter

    ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument

End Sub

Sub PREP()
'
' PREP Macro
'
'
    ActiveDocument.Sections(1).Range.Select
    ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
    Selection.HeaderFooter.Shapes("WordPictureWatermark").Select
    Selection.Delete
    ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
    ActiveDocument.Sections(1).Range.Select
    ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
    Selection.HeaderFooter.Shapes.AddPicture(FileName:= _
        "E:\IT\MS Office 2013\PREP Watermark.png", LinkToFile:=False, _
        SaveWithDocument:=True).Select
    Selection.ShapeRange.Name = "WordPictureWatermark"
    Selection.ShapeRange.PictureFormat.Brightness = 0.5
    Selection.ShapeRange.PictureFormat.Contrast = 0.5
    Selection.ShapeRange.LockAspectRatio = True
    Selection.ShapeRange.Height = CentimetersToPoints(14.34)
    Selection.ShapeRange.Width = CentimetersToPoints(15.92)
    Selection.ShapeRange.WrapFormat.AllowOverlap = True
    Selection.ShapeRange.WrapFormat.Side = wdWrapNone
    Selection.ShapeRange.WrapFormat.Type = 3
    Selection.ShapeRange.RelativeHorizontalPosition = _
        wdRelativeVerticalPositionMargin
    Selection.ShapeRange.RelativeVerticalPosition = _
        wdRelativeVerticalPositionMargin
    Selection.ShapeRange.Left = wdShapeCenter
    Selection.ShapeRange.Top = wdShapeCenter
    ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
End Sub

我将非常感谢任何有关我所做错事的帮助。我有5个要创建

Any help on what I am doing wrong would be greatly appreciated. I have 5 of these to create

谢谢

Ryan

推荐答案

感谢您的理解。


这篇关于400名员工的水印宏的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-02 20:57