I'm writing a VBA class module that both Access 2000 and Word 2000 will use. How do I detect if it's Access or Word that's running the code? I want to conditionally compile code based on which one is running it.
Code:
#If (Access is running) Then
Dim shRegistry As New WshShell
strInstallPath = shRegistry.RegRead(strInstallSettings & "\Install_Path")
Set shRegistry = Nothing
#Else
'This command works in Word but not Access
strInstallPath = System.PrivateProfileString("", strInstallSettings, "Install_Path")
#End If