Hi - Looking for some more help!! (I can do things on my own…honest!!!)
Anyway, code efficiency is a good thing, and speed is a good thing. However, what do you do if the code you have runs too quickly??
I am sending a button in a mail to a user, I would like this user to click the button and for a view to open on the screen, print, and then CLOSE!
My problem, (different from my post yesterday), is to get the view to CLOSE! When I do get it to close, it runs too quickly and prints the mail out instead of the view!
Does anyone have any ideas as to how to slow this down or do it a different way?
Here is my code :
Sub Click(Source As Button)
'open the database
Dim workspace As New NotesUIWorkspace
Dim uiv As NotesUIView
Dim db As NotesDatabase
Dim s As New NotesSession
Call workspace.OpenDatabase _
( "SERVER", "folder\folder\name.nsf", "viewname", _
"Current", False, False )
Set uiv = workspace.CurrentView
Set db = s.CurrentDatabase
If db.IsOpen And db.Title = "NC System" Then
’
keybd_event &h11,0,0,0 ' Ctrl key down
keybd_event &h50,0,0,0 ' P key down
keybd_event &h11,0,2,0 ' Ctrl key up
keybd_event &h50,0,2,0 ' P key up
’
keybd_event &h09,0,0,0 ' Tab key down
keybd_event &h09,0,2,0 ' Tab key up
keybd_event &h09,0,0,0 ' Tab key down
keybd_event &h09,0,2,0 ' Tab key up
keybd_event &h27,0,0,0 ' Right arrow key down
keybd_event &h27,0,2,0 ' Right arrow key up
keybd_event &h27,0,0,0 ' Right arrow key down
keybd_event &h27,0,2,0 ' Right arrow key up
keybd_event &h27,0,0,0 ' Right arrow key down
keybd_event &h27,0,2,0 ' Right arrow key up
keybd_event &h27,0,0,0 ' Right arrow key down
keybd_event &h27,0,2,0 ' Right arrow key up
keybd_event &h10,0,0,0 ' Shift key down
keybd_event &h09,0,0,0 ' Tab key down
keybd_event &h10,0,2,0 ' Shift key up
keybd_event &h09,0,2,0 ' Tab key up
keybd_event &h10,0,0,0 ' Shift key down
keybd_event &h09,0,0,0 ' Tab key down
keybd_event &h10,0,2,0 ' Shift key up
keybd_event &h09,0,2,0 ' Tab key up
keybd_event &h10,0,0,0 ' Shift key down
keybd_event &h09,0,0,0 ' Tab key down
keybd_event &h10,0,2,0 ' Shift key up
keybd_event &h09,0,2,0 ' Tab key up
’
keybd_event &h27,0,0,0 ' Right arrow key down
keybd_event &h27,0,2,0 ' Right arrow key up
’
keybd_event &h12,0,0,0 ' Alt key down
keybd_event &h41,0,0,0 ' A key down
keybd_event &h12,0,2,0 ' Alt key up
keybd_event &h41,0,2,0 ' A key up
’
keybd_event &h0d,0,0,0 ' Enter key down
keybd_event &h0d,0,2,0 ' Enter key up
keybd_event &h12,0,0,0 ' Alt key down
keybd_event &h31,0,0,0 ' 1 key down
keybd_event &h12,0,2,0 ' Alt key up
keybd_event &h31,0,2,0 ' 1 key up
End If
'I have tried this :
keybd_event &h12,0,0,0 ' Alt key down
keybd_event &h31,0,0,0 ' 1 key down
keybd_event &h12,0,2,0 ' Alt key up
keybd_event &h31,0,2,0 ' 1 key up
'And This :
keybd_event &h1b,0,0,0 ' Escape Key Down
keybd_event &h1b,0,2,0 ' Escape Key Up
'And this:
uiv.Close
End Sub
As you can see, I have tried many things, including a For Loop to create a pause, but it still doesn’t work.
Anyone have any ideas?
Thanks in Advance
F1H