Variables.Add Method

Returns a Variable object that represents a variable added to a document.

Namespace:  Microsoft.Office.Interop.Word
Assembly:  Microsoft.Office.Interop.Word (in Microsoft.Office.Interop.Word.dll)

Syntax

'Declaration
Function Add ( _
    Name As String, _
    ByRef Value As Object _
) As Variable
'Usage
Dim instance As Variables
Dim Name As String
Dim Value As Object
Dim returnValue As Variable

returnValue = instance.Add(Name, Value)
Variable Add(
    string Name,
    ref Object Value
)

Parameters

  • Name
    Type: System.String
    Required String. The name of the document variable.
  • Value
    Type: System.Object%
    Optional Object. The value for the document variable.

Return Value

Type: Microsoft.Office.Interop.Word.Variable

See Also

Reference

Variables Interface

Variables Members

Microsoft.Office.Interop.Word Namespace