You can use a registry search like shown in the following snippet:
<Property Id="OFFICEPATH">
<RegistrySearch Id="OfficeReg" Root="HKLM" Key="SOFTWARE\Microsoft\Office\14.0\Common\InstallRoot" Name="Path" Type="raw" />
</Property>
<Condition Message="This application requires Microsoft Office 2010. Please install Office then run this installer again.">
<![CDATA[Installed OR (OFFICEPATH)]]>
</Condition>
Also you may consider using the Windows Installer
APIs to find out if the relevant product/package/component codes are present on the machine. These can be done via P/Invoke calls.
Everything depends on which Office editions you need to support. There are Click2Run
editions of MS Office that don't add the usual or necessary windows registry keys. In that case you need to have a special case for that, for example, if your add-in is for Outlook, you could check the following path in the windows registry:
HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Office\15.0\Common\InstallRoot\Virtual\VirtualOutlook
Read more about that in the Determine whether Outlook is a Click-to-Run application on a computer