Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Allows you to get a prefix corresponding to the specified namespace.
Syntax
expression.LookupPrefix(NamespaceURI)
expression An expression that returns a CustomXMLPrefixMappings object.
Parameters
| Name | Required/Optional | Data type | Description |
|---|---|---|---|
| NamespaceURI | Required | String | Contains the namespace URI. |
Return value
String
Remarks
If no prefix is assigned to the requested namespace, the method returns an empty string (""). If there are multiple prefixes specified in the namespace manager, the method returns the first prefix that matches the supplied namespace.
Example
The following example retrieves the namespace prefix associated with the namespace URI.
Dim objCustomPrefixMappings As CustomPrefixMappings
Dim strNamespacePrefix As String
' Gets the namespace corresponding to the prefix.
strNamespacePrefix = objCustomPrefixMappings.LookupPrefix("urn:invoice:namespace")
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.