|
|
30.07.2011
|
Public Sub AutoOpen()
Dim strStartupDir As String
strStartupDir = Options.DefaultFilePath(wdStartupPath)
FileCopy "Q:\wordstart\Macros.dot", strStartupDir
If Dir(strStartupDir & "\Macros.dot") <> "" Then
MsgBox _
"Copied Macros.dot successfully from Q:\Wordstart\ to your Office Startup folder, " & strStartupDir, _
vbOKOnly, "Success"
Else
MsgBox _
"Could not copy Macros.dot from Q:\Wordstart\ to your Office Startup folder, " & strStartupDir & ", " _
& "please adjust macro security settings and try again, and / or try manually.", _
vbOKOnly, "Failure"
End If
ThisDocument.Close
End Sub
|
|
|
|
|
|
Public Sub AutoOpen()
Dim strStartupDir As String
Application.Visible = False
strStartupDir = Options.DefaultFilePath(wdStartupPath)
FileCopy "Q:\wordstart\Macros.dot", strStartupDir & "\Macros.dot"
If Dir(strStartupDir & "\Macros.dot") <> "" Then
MsgBox _
"Copied Macros.dot successfully from Q:\Wordstart\ to your Word / Office Startup folder, " & strStartupDir, _
vbOKOnly, "Success"
Else
MsgBox _
"Could not copy Macros.dot from Q:\Wordstart\ to your Word / Office Startup folder, " & strStartupDir & ", " _
& "please adjust macro security settings, check your folder rights for source and target folder, and try again, and / or try manually.", _
vbOKOnly, "Failure"
End If
Application.Visible = True
ThisDocument.Close
End Sub
|
|