>A user wants to send an email form a Foxpro application. I display what will be sent in a Foxpro form before sending. One textbox contains the name (full path) of an attachment file. I would like the user to be able to double-click on the attachment and it would open in it's native application for viewing before sending, but, I con't get this to work. The attachment could be of any file type. My test files are a Word document, an Excel spreadsheet, and an Adove Acrobat file (PDF). None will open for viewing.
>
>I have tried:
> run This.Value
>and run /N This.Value
>
>No luck ... Any ideas?
RUN alone only works for executables and DOS commands. You will also have problems with the "This.Value" part, since RUN will take it as the filename. The following should work (but I didn't try it right now):
local lcFilename
lcFileName
RUN START &lcFileName
START is a DOS command that opens any document or executable (similar to double-clicking in Windows Explorer).
Difference in opinions hath cost many millions of lives: for instance, whether flesh be bread, or bread be flesh; whether whistling be a vice or a virtue; whether it be better to kiss a post, or throw it into the fire... (from Gulliver's Travels)