K
Kevin R
I need some help. I have the macro below but it is not working correctly. I want it to check the Startup Path of Word and then depending on the path it does 1 of 3 things. If it matches the first path, then it shows the form from modMyMenu. If it doesn't match the first but matches the second then it shows the form from modMyMenu2. If it doesn't match either then it displays a message. As it is now, it just jumping to the last and displaying the message even tho the startup path matches one of the first 2 items. What am I doing wrong?
Dim sPath
sPath = Options.DefaultFilePath(wdStartupPath)
If sPath = "C:\office\startup" Then
Application.Run MacroName:="modMyMenu.ShowFileForm"
ElseIf sPath = "C:\office_2\Startup" Then
Application.Run MacroName:="modMyMenu2.ShowFileForm"
Else
MsgBox "You have not set the Startup path for Word to the proper location. Consult your local systems administrator for assistance." _
, vbOKOnly, "Startup Path Error"
End If
Dim sPath
sPath = Options.DefaultFilePath(wdStartupPath)
If sPath = "C:\office\startup" Then
Application.Run MacroName:="modMyMenu.ShowFileForm"
ElseIf sPath = "C:\office_2\Startup" Then
Application.Run MacroName:="modMyMenu2.ShowFileForm"
Else
MsgBox "You have not set the Startup path for Word to the proper location. Consult your local systems administrator for assistance." _
, vbOKOnly, "Startup Path Error"
End If