The following code works perfect if I run the script not as admin:
Code: Select all
F2::
oWord := ComObjActive("Word.Application")
oWord.Selection.PageSetup.LineNumbering.Active := 1
oWord := ""
return
Code: Select all
If not A_IsAdmin
{
Run *RunAs "%A_ScriptFullPath%"
ExitApp
}