Volume 2: Solutions and Publishing disclaimer


Trust Center and Remove Hidden Information



Download 0.72 Mb.
Page11/12
Date10.08.2017
Size0.72 Mb.
#31124
1   ...   4   5   6   7   8   9   10   11   12

Trust Center and Remove Hidden Information


Security and being able to trust the programs that run on your computer is becoming more and more of an issue for users. The Trust Center is used to control which programs are allowed to run on your computer. The Remove Hidden Information tool in Visio allows you to depersonalize drawings when saving and sending them to other users.

Trust Center

About Security Settings and Running Code in Visio

Creating secure applications is one of the primary challenges facing solution developers. Users, administrators, and developers are increasingly aware of the potential of unknowingly running code that can be harmful to their computers. It is more important than ever that you help to ensure the integrity of your applications.

Starting with Microsoft® Office Visio® 2007, all security settings are Office-wide and are set in the Trust Center (accessed via File > Options). Affected settings include the following:



  • Specifying trusted publishers

  • Specifying trusted locations

  • Loading COM add-ins

  • Loading published and path-discovered add-ons

  • Loading VBA macros

Note:

In previous versions of Visio, settings were made in the Security dialog box and the Security tab of the Options dialog box (Tools menu). Starting with Visio 2007, these dialogs have been eliminated.



About Setting Microsoft Office 2007 Security in a Testing Environment

To install and run an unsigned COM add-in, the Require Application Add-ins to be signed by Trusted Publisher and the Disable all Application Add-ins options must be cleared in the Add-ins tab in the Trust Center.

To run all VBA macros, including those that have not been digitally signed, the Enable all macros option must be set in the Trust Center. It is strongly recommended that you do this only in a testing environment. After you have completed your testing, set the options back to their original state.

In the Macro Settings tab of the Trust Center, you can also set options to Disable all macros without notification, Disable all macros with notification, or Disable all macro except digitally signed macros.

About Secure Deployment of Managed COM Add-ins in Microsoft Office 2007

To comply with Office 2007 security, managed COM add-ins (COM add-ins targeting the common language runtime) must be digitally signed, and users' security settings should be set in the Office Trust Center to allow add-ins in your Office applications. Additionally, you will need to incorporate into your managed COM add-in project a small unmanaged proxy called a shim to avoid unexpected security warnings. For details, search for "deployment managed add-ins" in the MSDN Library.
About Automating the Visual Basic Editor

In Visio 2007, when calling the features of the Microsoft Visual Basic for Applications Extensibility object model, you may receive an error message that programmatic access to the Visual Basic project is not trusted.

To prevent this message from appearing, in the Macro Settings tab select the Trust access to the VBA project object model box. By checking this box, macros in any macro-enabled document that you open can access the core Microsoft Visual Basic objects, methods, and properties, which represents a possible security hazard. The recommended behavior is to check the Trust access to the VBA project object model box only for the duration of a macro that accesses the Visual Basic object model. The Trust access to the VBA project object model box should be unchecked after the macro has finished running.


Remove Hidden Information


Using the RemoveHiddenInformation method of the Document object is the equivalent of selecting corresponding checkboxes in the Remove Hidden Information dialog box (File > Info > Remove Personal Information) in the Visio user interface.
Useage

expression.RemoveHiddenInformation(VisRemoveHiddenInfoItems)
Return Value

Nothing

expression   An expression that returns a Document object.
Parameters

VisRemoveHiddenInfoItems

The items to be removed. A combination of one or more enumerated values from the VisRemoveHiddenInfoItems enumeration.



Enumeration for VisRemoveHiddenInfoItems

Constant

Value

Description

visRHINone

0




visRHIPersonalInfo

1

Removes personal information.

visRHIPreview

2

Removes document preview thumbnail images.

visRHIMasters

4

Removes unused masters.

visRHIStyles

8

Removes unused styles, themes, and other display formats.

visRHIDataRecordsets

16

Removes data recordsets.


Sample VBA code

Public Sub RemoveHiddenInformation_Example()

ActiveDocument.RemoveHiddenInformation visRHIPersonalInfo + _ visRHIPreview

End Sub

Preventing masters from being removed from a document


Sometimes custom solutions store masters in the document stencil so that they are available to the application code at all times. The developer must find a way to prevent these masters from being deleted inadvertently by the use of the Remove Hidden Information Tool.

Fortunately the Visio team thought of this scenario and provided the following solution.




Tip:

Add the User-defined cell User.msvRHIPreventRemoval to the page sheet in the master and set the value to 1. This will cause the Remove Hidden Information tool to NOT remove the unused master.



Remove Personal Information


Setting the RemovePersonalInformation property of the Document object is equivalent to setting Remove personal information from file properties on save option under Document-specific settings on the Privacy Options page of the Trust Center dialog.




Download 0.72 Mb.

Share with your friends:
1   ...   4   5   6   7   8   9   10   11   12




The database is protected by copyright ©ininet.org 2024
send message

    Main page