Link to home
Start Free TrialLog in
Avatar of arakis
arakis

asked on

'If exist' code syntax when Custom Form printing via Word template

I have created a custom outlook form and have used the Word template method for printing it.

Within the Outlook form code I can define the template path/filename as e.g. 'strTemplate = "c:\templates\formprn.dot"' and all works OK.

However the word template could be in one of two locations so I would like to try something similar to the following:-

'If exist "c:\templates\formprn.dot" then
   strTemplate = "c:\templates\formprn.dot"
  Else
   strTemplate = "d:\templates\formprn.dot"
End if'

However, above syntax/command structure is incorrect and have been unable to find any sample code.

Can anybody point me in the right direction?

A.  


ASKER CERTIFIED SOLUTION
Avatar of Steiner
Steiner

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial