如何在Word中隐藏VBScript

如何在文档(Word,Excel等)中隐藏.vbs文件?打开文档时也应执行此操作。

我使用命令“ copy”进行了尝试,但未执行脚本。

最佳答案

Visual Basic for Applications(VBA)宏可以在以下情况下自动执行 该文档已打开,但无法将其隐藏。

This is especially true because a Word documents that contains macros must be in the .docm format and not .docx, which is already a big giveaway hint. Another hint is that when the document is downloaded from the internet and opened, Word will ask (once) permission to execute macros, which is an even bigger giveaway hint.

For more information about VBA, see Microsoft Get started with Visual Basic.