Word Text box copy data and edit

Hi guys,

I am sure this is not too hard to do but I cannot find the right information to get started. I have not worked in VBS, VBA in some time. Also would like this to work in Word 2013. 

What i want to do is create a new user form template. That is someone add name, surname and this will create the default user name in both formats (2000 and 2003+) and also email address

EG  User enters, Name field, Surname Field. 

on exit

Logon name = domain\name surname (20chr limit)

FQDN name surname@domain.com

email = name.surname@domain.com

I though this would be simple as creating a VBA script that activates on exit, loss of focus for TextboxName and then fills in the other text box. Yet I cannot correctly find how to Label the textbox (TAG field I think) then access the on exit or loss of focus field script.

I think its something like.

Activedocument.shape(textname) on exit

activedocument.share(TextEmail).result = activedocument.shape(textName).result 

Can someone tell me how to do this or link a page. I will have to do some extra coding where logon name equals name + surname first 20 characters but I should be able to do that ok.

Thanks for your time.

Craig

September 6th, 2015 11:28pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics