我在 word 中使用强制样式锁定保护工作表。我想制作一个宏,允许使用原始格式在文档中粘贴,并且只允许粘贴来自其他来源的文本。
我想让它看起来像:
Public Sub Pasting()
If "pasting within document = true" Then
Set aDoc = activeDocument
aDoc.Unprotect
Selection.PasteAndFormat Type:=wdFormatOriginalFormatting
aDoc.Protect wdAllowOnlyReading,UseIRM:=False,EnforceStyleLock:=True
Else
Selection.Paste 'it will remove formating anyway because of file being protected
End If
End Sub
不知道怎么处理,不知道怎么设计条件语句。 请帮忙,谢谢:)