ms word - Add specific citation based on user selection with vba -
i trying create userform user selects year , citation specific book inserted based on option. have tried inserting docvariable (called "bookyear") field inside text , changing variables value (to "aus15") through vba. code below doesnt work think i'm on right path
sub macro2() if mycombobox = 2015 activedocument.variable("bookyear").value = "aus15" activedocument.fields.update end if end sub
found answer
mytext = "aus15"
selection example: ''çode select bookmark selection.fields.add range:=selection.range, _
type:=wdfieldcitation, text:=mytext
Comments
Post a Comment