Results 1 to 7 of 7

Thread: Use existing Outlook form with VBa

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 2005
    Posts
    27

    Resolved Use existing Outlook form with VBa

    I have an existing Outlook form.
    Can I use events of this form with VBA.
    for example, when someone replies I want to run a module.
    Last edited by snir; Jun 27th, 2005 at 06:25 AM.

  2. #2
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Use existing Outlook form with VBa

    the form should have events for itself and any controls on the form, if you have a commandbutton it should have a click event.
    at the top of the forms code widow should be 2 dropdown combos, the left one selects the controls, the right one the events for the selected control

    pete

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jun 2005
    Posts
    27

    Re: Use existing Outlook form with VBa

    My problem is that the code in the form code is VBScript and I need VBA in order to run exe file that locks a workstation.

  4. #4
    PowerPoster
    Join Date
    Dec 2004
    Posts
    25,618

    Re: Use existing Outlook form with VBa

    i am not really familiar with vbscript, but i believe you can use wscript.shell to run an exe file, but as the lockworkstation was an api call it would have to be put into a separate exe file first

    Set wshell = CreateObject("WScript.Shell")
    wshell.Run "c:\scripts\test.exe"

    edit: i am attaching an a zipped exe of the lockworkstation function
    it is totally untested, up to you if you use it

    pete
    Attached Files Attached Files
    Last edited by westconn1; Jun 23rd, 2005 at 10:09 PM.

  5. #5

    Thread Starter
    Junior Member
    Join Date
    Jun 2005
    Posts
    27

    Re: Use existing Outlook form with VBa

    Thanks, I will try it

  6. #6

    Thread Starter
    Junior Member
    Join Date
    Jun 2005
    Posts
    27

    Resolved Re: Use existing Outlook form with VBa

    It's working
    Thanks

  7. #7

    Thread Starter
    Junior Member
    Join Date
    Jun 2005
    Posts
    27

    Re: Use existing Outlook form with VBa

    Is it possible for you to send me the code which generated the exe file for further developments?

    Your name will apear, of course, as the author of the code

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width