Results 1 to 6 of 6
  1. #1
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    527
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Shell command (AXP)

    Hello All,
    I am running a shell command to open MS outlook as a part of a forms code. How can I then close the Outlook application after I am finished with the code?

    Thanks,
    Mark

  2. #2
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Shell command (AXP)

    Hi Mark,
    I'd suggest you use automation rather than Shell - either Set objOutlook = New Outlook.Application or use CreateObject. It will give you more control over the application and allow you to issue a simple objOutlook.Quit at the end.
    Hope that helps.
    Regards,
    Rory

    Microsoft MVP - Excel

  3. #3
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Shell command (AXP)

    Check <post#=158114>post 158114</post#>.
    Pat <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

  4. #4
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    527
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Shell command (AXP)

    Thanks Guys,
    I guess what I need is to only start up outlook in the background and not actually go on creating a message at that point. WIll either of the method you have suggested allow me to do this? The real problem has to do with AXP and Outlook 2002 and security. I have code that has worked since 1997 but now it seems that with AXP and Outlook 2002 there are some security settings that prevent normal users from remotely opening the Outlook application. IT Admins can run the code and it works just fine. Anyhow, I hope I am making sense here.

    Thanks,
    Mark

  5. #5
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Shell command (AXP)

    IMHO Rory has pointed you in the right direction. Using the Shell command under Citrix with Outlook is going to be dicey as there isn't the Automation link to tell Outlook who it belongs to. Also, although Outlook security is a good suspect, I wouldn't entirely dismiss OS issues since Admins can make it work. In any even, I would definitely look at using Automation. If you haven't worked with it much, you should probably look at some of the articles about Automation and Outlook on the MS Knowledge Base. You might also want to look at The Access Developers Handbook, as it has a good section on the subject. Also, Helen Feddema's new book Access 2000 Inside Out (or something like that) goes into a fair bit of depth on the subject. For starters you might want to download the Automation Help.
    Wendell

  6. #6
    4 Star Lounger
    Join Date
    Jun 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    527
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Shell command (AXP)

    Thanks everybody for the help.

    Mark

Posting Permissions

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