简体   繁体   English

Office 365受保护的视图破坏Excel Marcos

[英]Office 365 Protected View Breaking Excel Marcos

Our client has updated to Microsoft Office 365 (Version 1708) and when receiving a generated Excel file (xlt) via email which contains a vb macro, it now displays "PROTECTED VIEW Be careful - email attachments can contain viruses. Unless you need to edit, it's safer to stay in Protected View." 我们的客户端已更新到Microsoft Office 365(版本1708),当通过包含vb宏的电子邮件接收到生成的Excel文件(xlt)时,它现在显示“保护视图请小心-电子邮件附件可能包含病毒。除非您需要编辑,留在保护视图中更安全。” - and doesn't run the macro (of course). -并且不运行宏(当然)。

Clicking the "Enable Editing" the user gets a runtime error, but in Office 2013 it works fine. 单击“启用编辑”,用户会遇到运行时错误,但在Office 2013中可以正常运行。

Also in Office 365 if we untick "Enable Protected View for Outlook attachments" and resend the file, it works okay. 同样在Office 365中,如果我们取消选中“为Outlook附件启用受保护的视图”并重新发送文件,则可以正常进行。

Any ideas? 有任何想法吗? Cheers, Steve 干杯,史蒂夫

After many hours of hacking and googling, we found that this is an existing bug in Office 365. 经过数小时的黑客和谷歌搜索,我们发现这是Office 365中的现有错误。

A workable workaround for us was to change: 对我们来说,一个可行的解决方法是更改​​:

Private Sub Workbook_Open()
    Call formatData
End Sub

To: 至:

Private Sub Workbook_Activate()
    Call formatData
End Sub

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM