Macro to open Office Apps from Excel


Open Word from Excel


Sub OpenMSWord()
Application.ActivateMicrosoftApp xlMicrosoftWord
End Sub

Open Calculator from Excel


Sub OpenCalc()
Application.ActivateMicrosoftApp Calculator
End Sub

Open Calculator (Alternative code)


Sub OpenCalc2()
Application.ActivateMicrosoftApp Index:=0
End Sub

Note: ‘0’ is the code for Calculator. ‘1’ for ‘Word’, ‘2’ for PowerPoint, ‘3’ for Outlook, ‘4’ for Access

Open the app of your choice


Sub OpenApp()
Dim X As Integer
X = InputBox("Enter the corresponding code to open a Office App" & vbCrLf & _
"0 - Calculator" & vbCrLf & "1 - Word" & vbCrLf & _
"2 - PowerPoint" & vbCrLf & _
"3 - Outlook" & vbCrLf & "4 - Access")
Application.ActivateMicrosoftApp Index:=X
End Sub

Note: ‘0’ is the code for Calculator. ‘1’ for ‘Word’, ‘2’ for PowerPoint, ‘3’ for Outlook, ‘4’ for Access


How to use codes shared here?