D
Dar-Shyang Lee
Hi,
Can someone tell me how to attach a macrobutton field with Addin
subfield to a range of text from VBA inside Word? I tried several
variations of the following code. However, the Addin either preceeds
the macrobutton field, or completely replaces it. Thanks very much.
Dim wd as Range
Dim fd as Field
Dim dd as Field
set wd = Selection.Words(1)
Set fd = ActiveDocument.Fields.Add(wd, wdFieldMacroButton, "MySub " &
wd.text)
Set dd = ActiveDocument.Fields.Add(wd, wdFieldAddin)
dd.data = "my arguments"
Dar-Shyang Lee
Can someone tell me how to attach a macrobutton field with Addin
subfield to a range of text from VBA inside Word? I tried several
variations of the following code. However, the Addin either preceeds
the macrobutton field, or completely replaces it. Thanks very much.
Dim wd as Range
Dim fd as Field
Dim dd as Field
set wd = Selection.Words(1)
Set fd = ActiveDocument.Fields.Add(wd, wdFieldMacroButton, "MySub " &
wd.text)
Set dd = ActiveDocument.Fields.Add(wd, wdFieldAddin)
dd.data = "my arguments"
Dar-Shyang Lee