Hi there pple.
I need to add a users name (over a network) to the footer of a word document. As i know it the code differences are simmilar between word and excel. this is what i have so far:
Code
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageFooter
On Error Resume Next
Application.UserName = GoToNext
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
"USERNAME ", PreserveFormatting:=True
Selection.TypeText Text:=" - "
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
"DATE ", PreserveFormatting:=True
Selection.TypeText Text:=" - "
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
"TIME \@ ""h:mm:ss am/pm"" ", PreserveFormatting:=True
Selection.TypeText Text:=" - "
Selection.Fields.Add Range:=Selection.Range, Type:=wdFieldEmpty, Text:= _
"AUTOTEXT ""Page X of Y"" ", PreserveFormatting:=True
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
Display More
Basically, i would like to make it the default document upon opening so that all the information is added to the footer. I need to also:
1. make it into an Add-in
2. Lock the footer so it cannot be used.
I would really appreciate any help. thank you.