To write for all versions of Office use a combination of the newer VBA7 and Win64 conditional Compiler Constants.
VBA7
determines if code is running in version 7 of the VB editor (VBA version shipped in Office 2010+).
Win64
determines which version (32-bit or 64-bit) of Office is running.
#If VBA7 Then
'Code is running VBA7 (2010 or later).
#If Win64 Then
'Code is running in 64-bit version of Microsoft Office.
#Else
'Code is running in 32-bit version of Microsoft Office.
#End If
#Else
'Code is running VBA6 (2007 or earlier).
#End If
See Microsoft Support Article for more details.