The With statement is used to simplify accessing complex data types. Listing 16 defines a data type that contains two different values: first name and last name. You can access these values by placing a period between the variable name and the data item.
Dim oProp As New com.sun.star.beans.PropertyValue oProp.Name = "Age" 'Set Name Property oProp.Value = "Amy Boyer" 'Set Value Property
The With statement provides a shortcut for accessing multiple data elements from the same variable.
Dim oProp As New com.sun.star.beans.PropertyValue With oProp .Name = "Age" 'Set Name Property .Value = "Amy Boyer" 'Set Value Property End With