A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Usage of InternetOpen from Outlook VB Add-in



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old September 23rd 09, 08:13 AM posted to microsoft.public.outlook.program_vba
paresh
external usenet poster
 
Posts: 66
Default Usage of InternetOpen from Outlook VB Add-in

Hi,

I have written Outlook Add-in which opens an our http link to do some
important work. It is working fine but has some inconsistencies and
performance issue with it. Though my code does cleanup, after few invocations
of that link from my Add-in toolbar button, Outlook gets non-responsive for
few seconds and then it comes back to normal but doesn't open http link.

Please refer my code give below and let me know if I am missing anything. I
really not sure why it has been happening like this. Any assistance would be
appreciated.

Sub GetUserInformation()
On Error GoTo Err_handler:
Dim hOpen As Long
Dim hConn As Long
Dim sUrl As String
Dim userId As Long
userId = 12345

sUrl = "https://getuserinfo.ky.com:14401/userinfo.cgi?q=" & userId

' create an internet connection, open link and do clean up
hOpen = InternetOpen("GetUserInformation", INTERNET_OPEN_TYPE_DIRECT,
vbNullString, vbNullString, 0)

hConn = InternetOpenUrl(hOpen, sUrl, vbNullString, ByVal 0&,
INTERNET_FLAG_RELOAD, ByVal 0&)

InternetCloseHandle hConn
InternetCloseHandle hOpen

Exit Sub
Err_handler:
MsgBox "Error in opening internet URL.", vbOKOnly, "GetUserInfo"

End Sub

Thanks.
Ads
  #2  
Old September 28th 09, 03:33 PM posted to microsoft.public.outlook.program_vba
Eric Legault [MVP - Outlook]
external usenet poster
 
Posts: 830
Default Usage of InternetOpen from Outlook VB Add-in

This wouldn't be an issue with Outlook in any way. Your dealing with factors
like web browsers and OS performance/configuration that's beyond Outlook's
control.

--
Eric Legault - Outlook MVP, MCDBA, MCTS (SharePoint programming, etc.)
Try Picture Attachments Wizard for Outlook:
http://www.collaborativeinnovations.ca
Blog: http://blogs.officezealot.com/legault/


"paresh" wrote:

Hi,

I have written Outlook Add-in which opens an our http link to do some
important work. It is working fine but has some inconsistencies and
performance issue with it. Though my code does cleanup, after few invocations
of that link from my Add-in toolbar button, Outlook gets non-responsive for
few seconds and then it comes back to normal but doesn't open http link.

Please refer my code give below and let me know if I am missing anything. I
really not sure why it has been happening like this. Any assistance would be
appreciated.

Sub GetUserInformation()
On Error GoTo Err_handler:
Dim hOpen As Long
Dim hConn As Long
Dim sUrl As String
Dim userId As Long
userId = 12345

sUrl = "https://getuserinfo.ky.com:14401/userinfo.cgi?q=" & userId

' create an internet connection, open link and do clean up
hOpen = InternetOpen("GetUserInformation", INTERNET_OPEN_TYPE_DIRECT,
vbNullString, vbNullString, 0)

hConn = InternetOpenUrl(hOpen, sUrl, vbNullString, ByVal 0&,
INTERNET_FLAG_RELOAD, ByVal 0&)

InternetCloseHandle hConn
InternetCloseHandle hOpen

Exit Sub
Err_handler:
MsgBox "Error in opening internet URL.", vbOKOnly, "GetUserInfo"

End Sub

Thanks.

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlook 6 100% CPU usage Larry Gomberg Outlook Express 2 June 30th 08 09:10 PM
Outlook.exe CPU usage 100% Giovanni Outlook - General Queries 2 June 15th 07 09:46 PM
Outlook Memory Usage Errol Outlook - Installation 1 December 8th 06 09:58 AM
Outlook overpowering CPU usage Edward Owen Outlook - General Queries 1 October 9th 06 07:49 PM
Outlook 2002 CPU Usage at 100% [email protected] Outlook - General Queries 4 July 15th 06 05:48 PM


All times are GMT +1. The time now is 07:57 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.