Document.RemoveHiddenInformation Method (Visio)

Removes hidden information, such as personal information and external data, from a Microsoft Visio document.

Syntax

expression. RemoveHiddenInformation( _VisRemoveHiddenInfoItems_ )

expression An expression that returns a Document object.

Parameters

Name Required/Optional Data type Description
VisRemoveHiddenInfoItems Required Long The items to be removed. A combination of one or more enumerated values from the VisRemoveHiddenInfoItems enumeration. See Remarks for possible values.

Return value

Nothing

Remarks

For the VisRemoveHiddenInfoItems parameter, pass a combination of one or more of the following values from the VisRemoveHiddenInfoItems enumeration, which is declared in the Visio type library.

Constant Value Description
visRHIPersonalInfo 1 Removes personal information.
visRHIDataRecordsets 16 Removes data recordsets.
visRHIPreview 2 Removes document preview thumbnail images.
visRHIMasters 4 Removes unused masters.
visRHIStyles 8 Removes unused styles, themes, and other display formats.
visRHIValidationRules 32 Removes data rows not linked to shapes in the drawing.

Calling the RemoveHiddenInformation method is the equivalent of the selecting the options available in the Remove Hidden Information dialog box (click the File tab, click Info, and then click Remove Personal Information).

Example

This Microsoft Visual Basic for Applications (VBA) macro shows how to use the RemoveHiddenInformation method to remove personal information and the preview thumbnail from the active document.

Public Sub RemoveHiddenInformation_Example() 
 
    ActiveDocument.RemoveHiddenInformation visRHIPersonalInfo + visRHIPreview 
 
End Sub