Group: microsoft.public.word.vba.general
From: =?Utf-8?B?R2VvcmdlIExlZQ==?=
Date: Monday, April 07, 2008 10:37 AM
Subject: RE: Opening a web page using VB

I had tunnel vision. This is for a VBA application that opens a Web page.

"George Lee" wrote:

> You can’t do it directly, but rather you have to use a Windows call:
>
> Const SW_SHOWNORMAL = 1
> Private Declare Function apiShellExecute 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
>
> Public Sub GotoWebSite()
> Call apiShellExecute(0, "open", "http://google.com", vbNullString,
> "c:\", SW_SHOWNORMAL)
> End Sub
>
>
> "halfawake" wrote:
>
> > I have written a script to check if people are opening word documents from
> > email. All it really does is check the path, if it is in the temp directory
> > it ask them if they want to save the document to the document managment
> > system. We recently changed our DM to a web based system. With this I was
> > trying to modify my script to save to the new dm. All I really need to do is
> > have the script open a .asp web page that has the document path in the url. I
> > can format the url I just can't get VBA to open a web page. Not even
> > google.com. I looked all over the web ie.. googled it, microsoft.com, and the
> > ms vip pages without any luck. I was wondering if anybody knew how to do
> > this. Just so you know we use word 2003.

Safety Articles | Usenet Groups | Usenet News | Bluegrass