Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

linking to web

Status
Not open for further replies.

unit512

MIS
Mar 12, 1999
233
US
We have a VF 6 program.
We want a specific button to
1. open the browser
2. go to a web site
3. load a pdf file

We got the first 2 (except the browser opens minimized),
but cannot get the 3rd part.

Can anyone help?

GA
 
* Show SM4 MANUAL
*++++*
*++++*SAK - 04/13/2001 Abelson WEB
*clUrl = SYS(2003) + "\SM4 Manual.PDF"
clUrl = "*----*
*----*End
*Opening the Browser Example (VFP6)
*Function GoURL(tcUrl, tcAction)
*tcUrl = iif(type("tcUrl")="C",tcUrl,"*tcAction = iif(type("tcAction")="C",tcAction,"Open")
if !empty(clUrl)
cAction = "Open"
wait window "Loading Browser..." nowait
clUrl = clUrl
declare integer ShellExecute;
in SHELL32.dll ;
integer nWinHandle, ;
string cOperation, ;
string cFileName, ;
string cParameters, ;
string cDirectory, ;
integer nShowWindow
declare integer FindWindow ;
in WIN32API ;
string cNull, string cWinName
return ShellExecute(FindWindow(0,_screen.caption),;
cAction, clUrl, "", sys(2023), 1)
Endif && empty(clUrl)
 
According to your code, it will be opening the following URL:

IMO, it appears your code isnt specifying the PDF to open.

Try changing clUrl to:

clUrl = " Manual.PDF"

Then, to test:

oShell=CreateObject('Shell.Application')
oShell.Open(clUrl) Jon Hawkins

The World Is Headed For Mutiny,
When All We Want Is Unity. - Creed
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top