jacker wrote on Feb 16
th, 2011 at 3:30pm:
How would I create a "View PDF" or "View Document" button that would launch a browser (or Acrobat or Word) and open the URL of the document?
Jacker,
the @Asynchshell() command will do exactly what you desire.
In the example below I use the Sbasic on a command button to build the correct file name to look for on a "cloud type" drive. All of this type file reside on the P drive in a directory sesame\ctrak1\invimg. In my case the file is always named the customer user ID plus the invoice number plus the 3 letters INV and it is always a pdf. when the button is pressed it goes out and if the file exists it pops up the pdf file using the utility it is associated with. This same method works for pdf, docx or anything else the operating system understands.
var VInvname as string
var Vviewer as string
VInvname = cusid + InvNo + "Inv.pdf"
iF FileExists(("p:\sesame\ctrak1\invimg\" + VInvname))
{
Vviewer = @Asynchshell("p:\sesame\ctrak1\invimg\" + VInvname)
}
else
{
@Msgbox("The Confirmation sheets", "have not", "been generated yet")
}
_________________________________________________________________________
You can also use the FileExists() and Visibility() command like the example below to make the above command button only visible when the file actually exists on the "Cloud Drive"
SUBROUTINE Confbuttons() //makes correct buttons visible for confirmation sheets
Var vconfYN as String
vconfYN = "p:\sesame\ctrak1\invimg\"+cusid + InvNo + "Inv.pdf"
iF FileExists(vconfYN)
{
Visibility(Generate Confirmation sheets, 0)
Visibility(view Confirmation sheets, 1)
}
else
{
Visibility(Generate Confirmation sheets, 1)
Visibility(view Confirmation sheets, 0)
}
END SUBROUTINE
Hope this points you in the correct direction.

PS. A simple device called a pogoplug biz works well to create a web based storage device that your Sesame WEB application can access easily as a drive and your non Sesame users can upload files to from a website.