#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 137
Default Lotus Notes

I am using the following code to test for the existence of a notes session
and if not then to start it:

Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
(ByVal lpClassName As String, _
ByVal lpWindowName As String) As Long
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

Sub CheckNotes()
Dim hwnd As Long
program = "Notes"
hwnd = FindWindow(program, vbNullString)
If hwnd < 0 Then
MsgBox "Notes is already running"
Else
MsgBox "Notes will now start"
ShellExecute 0, "open", "C:\Documents and Settings\All Users\Desktop\lotus
notes.lnk", "", "c:\", 1
End If

Application.Visible = True

End Sub

Problem is I need to shift focus back to excel after the password has been
entered into the new notes session but I am failing miserably.

Grateful for any ideas.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Lotus Notes Steve Excel Discussion (Misc queries) 0 February 25th 09 08:27 PM
lotus notes attachments dunks Excel Worksheet Functions 0 March 28th 07 03:07 AM
Lotus notes link Yogi Smith Excel Discussion (Misc queries) 1 July 10th 06 04:59 AM
VBA and Different Lotus Notes versions m@ Excel Programming 0 April 20th 04 08:42 PM
E-mail using Lotus Notes Alan Hutchins Excel Programming 1 February 20th 04 02:06 PM


All times are GMT +1. The time now is 09:50 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"