StuLux
Well-known Member
- Joined
- Sep 14, 2005
- Messages
- 679
- Office Version
- 365
- Platform
- Windows
I use the following code from Excel to check which version of Office is being used and then use the appropriate PowerPoint version. For development purposes I have now installed both Excel 2003 and Excel 2007 on my PC so the code no longer works as I only have PowerPoint 2007 i.e. the code identifies that I am using Excel 2003 and then tries to open PowerPoint 2003 and fails. Can anybody help me adapt this code so it actually checks what version of PowerPoint is installed rather than checking what version of Excel is being used?
Code:
'Start PowerPoint
If Application.Version = 11# Then
PPOpen = Shell("C:\Program Files\Microsoft Office\Office11\POWERPNT.EXE", 1)
Else
PPOpen = Shell("C:\Program Files\Microsoft Office\Office12\POWERPNT.EXE", 1)
End If
Set PPApp = CreateObject("Powerpoint.Application")