Reply
 
Thread Tools Display Modes
  #1   Report Post  
dagarve dagarve is offline
Junior Member
 
Posts: 1
Default Office Macro security

I have a question regarding Macro security handling in Office (specifically in Word and Excel). We are writing Office add-ins that interacts with a Document Management System (DMS). I need to be able to predict whether Word (or Excel) is going to ask the user if wants to enable Macros. Sorry for the long post, but it takes a few lines to explain this. :-)

We have used the DocumentBeforeClose (for Word: Microsoft.Office.Interop.Word.ApplicationEvents4) event where we have written an event handler. Now, every time a user closes a document, given the document has been checked out from the DMS, we ask the user if he wants to check the document in again. This works perfect for most situations, except the following:

• IF the document contains macros AND the macro settings is set to “Disable all macros with notification” (Trust Senter | Macro settings) AND the document is not located in a “Trusted location”, THEN Word will ask the user if he wants to enable macros. If the user ignores this question and continues working with the document, this is still not a problem. However, if the user choses to “Enable macros”, Word closes the document and reopens it (executing macros if applicable).

This also fires the DocumentBeforeClose event, which eventually leads to displaying our question “The document is checked out to you, do you want to check in again?” which is of course inappropriate and not very elegant at this point, because the user is actually opening a document, not closing.

This is the reason why we need to be able to predict WHY Word is closing the document, is it because the user closed the document or is it because Word forced a document close to reopen it with macros enabled. So, if there is a way to predict whether the document is closed for immediate reopening (which is the case if the user confirm that he want to enable macros), we could omit our re-check-in question.

I’ve been looking into using the msoAtuomationSecurity enumerable, but it seems this is set to msoAutomationSecurityLow despite of the security settings in Word which is set to “Disable all macros with notification”.

I have not been able to actually see the connection between the Macro Setting in Word and the value of msoAtuomationSecurity. An alternative solution to the problem could be to detect the Macro Setting in the Trust Center (if possible) and from that decide what to do. But I have not found any way of detecting these settings. Are they stored in registry?

Anyone got a clue?

Thank's in advance

Last edited by dagarve : June 21st 12 at 11:36 AM
  #2   Report Post  
chothueaidaicuoi205 chothueaidaicuoi205 is offline
Banned
 
Posts: 17
Default

Cho thuê âm thanh ánh sáng

Tổ chức lễ hội, sự kiện, ca nhạc, đám cưới, đám hỏi

Cho thuê m*n sao giá rẻ, m*n hình led giá rẻ chất lượng tốt

Cho thuê sân khấu ca nhạc, cho thuê đèn led pha, cho thuê loa kéo

https://violetwedding.net/cho-thue-a...-anh-sang.html
  #3   Report Post  
chothueaidaicuoi205 chothueaidaicuoi205 is offline
Banned
 
Posts: 17
Default

Cho thuê thiết bị b*n ghế Tiffany giá rẻ

Cho thuê nh* bạt, cổng sự kiện

Cho thuê b*n ghế hội nghị đám cưới/ tổ chức sinh nh*t/ sự kiện

Cho thuê b*n tròn, b*n ghế bar các loại

Cho thuê v* nh*n may khăn b*n theo yêu cầu

https://violetwedding.net/ghe-tiffany.html
  #4   Report Post  
chothueaidaicuoi205 chothueaidaicuoi205 is offline
Banned
 
Posts: 17
Default

Cho thuê gian h*ng trưng b*y sản phẩm, gian h*ng triển lãm giới thiệu doanh nghiệp trong hội chợ

Cho thuê gian h*ng tố chức sự kiện, trụ inox v* trụ barie + vải dây nhung các loại

Cho thuê h*ng r*o sắt di động trong các sự kiện, lễ hội

https://violetwedding.net/cho-thue-g...-tru-inox.html
  #5   Report Post  
chothueaidaicuoi205 chothueaidaicuoi205 is offline
Banned
 
Posts: 17
Default

Dịch vụ trang tr* b*n tiệc gallery cho các đám cưới hỏi sinh nh*t sự kiện theo yêu cầu tại nh* ở tphcm, giá rẻ trọn gói v* không phát sinh chi ph* khi s* dụng dịch vụ của Violet Wedding

https://violetwedding.net/trang-tri-...-dam-cuoi.html


Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Word Macro Security Bob_McK Microsoft Word Help 2 May 2nd 07 10:26 PM
About Macro Security Parag Vidhate Microsoft Word Help 10 June 23rd 06 01:04 PM
Macro Security ? GaijinSue Microsoft Word Help 2 March 7th 06 06:10 PM
Macro Security Dan Mailmerge 5 January 5th 06 10:37 AM
Macro Security JD Microsoft Word Help 11 April 24th 05 03:02 PM


All times are GMT +1. The time now is 10:26 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright 2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"