I'm trying to create a macro toolbar button in Microsoft Word (XP) that will
insert the initials or name or the person pushing the button at the cursor
location. What is the code for this?
Thanks,

Signature
Debra Ann
Greg Maxey - 31 Jan 2008 03:33 GMT
Sub Scratchmacro()
Selection.TypeText Application.UserInitials
End Sub

Signature
Greg Maxey/Word MVP
See:
http://gregmaxey.mvps.org/word_tips.htm
For some helpful tips using Word.
> I'm trying to create a macro toolbar button in Microsoft Word (XP)
> that will insert the initials or name or the person pushing the
> button at the cursor location. What is the code for this?
>
> Thanks,
Debra Ann - 31 Jan 2008 11:30 GMT
Thanks. This is what I needed.

Signature
Debra Ann
> Sub Scratchmacro()
> Selection.TypeText Application.UserInitials
[quoted text clipped - 5 lines]
> >
> > Thanks,
Klaus Linke - 31 Jan 2008 05:09 GMT
> I'm trying to create a macro toolbar button in Microsoft Word (XP) that
> will
> insert the initials or name or the person pushing the button at the cursor
> location. What is the code for this?
... or insert a {USERINITIALS} field or {DOCPROPERTY Author} field: No
typing necessary?
Though the field(s) would have to be unlinked or locked if the text is to be
preserved.
Regards,
Klaus