? Open Web page/URL using VBA 
Author Message
 ? Open Web page/URL using VBA

How can you open/get a web page using VBA (from inside OL2K or whoever)?



Thu, 01 May 2003 03:00:00 GMT  
 ? Open Web page/URL using VBA
Hi Terry,

Try using this API call:

Private Declare Function ShellExecute Lib "shell32.dll" Alias
"ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal
lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String,
ByVal nShowCmd As Long) As Long
Const SW_SHOWNORMAL = 1

 Sub test()

     ShellExecute 0, vbNullString, "http://www.yahoo.com", vbNullString,
Empty, SW_SHOWNORMAL

End Sub

HTH,
Jasper Mandos.
______________________

Microsoft newsgroups:

Knowledgebase:
http://search.support.microsoft.com/kb/c.asp

MSDN:
http://msdn.microsoft.com/default.asp



Quote:

> How can you open/get a web page using VBA (from inside OL2K or whoever)?



Fri, 02 May 2003 03:00:00 GMT  
 ? Open Web page/URL using VBA
Thank you Jasper - Somehow I was looking for something a bit more MS'ish in
VBA - Declare Alias probably covers a multitude of sins.


Quote:
> Hi Terry,

> Try using this API call:

> Private Declare Function ShellExecute Lib "shell32.dll" Alias
> "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal
> lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As
String,
> ByVal nShowCmd As Long) As Long
> Const SW_SHOWNORMAL = 1

>  Sub test()

>      ShellExecute 0, vbNullString, "http://www.yahoo.com", vbNullString,
> Empty, SW_SHOWNORMAL

> End Sub

> HTH,
> Jasper Mandos.
> ______________________

> Microsoft newsgroups:

> Knowledgebase:
> http://search.support.microsoft.com/kb/c.asp

> MSDN:
> http://msdn.microsoft.com/default.asp



> > How can you open/get a web page using VBA (from inside OL2K or whoever)?



Mon, 05 May 2003 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. ? Open Web page/URL using VBA

2. Opening Web Pages in Outlook using VBA-Help Needed

3. Opening Web Pages in Outlook using VBA-Help Needed

4. Open web page and go to a specific url

5. In ShellExecute Using URL Bookmark Tag(#) to open to place in page in IE 4.0

6. Opening a web page using VBScript

7. Opening a Web Page using default viewer...

8. How to get Url of framed web pages?

9. Hiding URL while printing a web page

10. Web Page URL

11. Printing a Web page without the URL showing up on bottom

12. Calling a WEB page URL inVB6

 

 
Powered by phpBB® Forum Software