Results 1 to 7 of 7

Thread: Question about Microsoft Outlook 9.0 Object Library

  1. #1

    Thread Starter
    Member
    Join Date
    Sep 2002
    Location
    Cordova, TN
    Posts
    60

    Unhappy Question about Microsoft Outlook 9.0 Object Library

    I have a question about the Microsoft Outlook 9.0 Object Library. My boss just came up to me and asked me to change my code. Here is my code :

    VB Code:
    1. '**************** Sets up and Sends Email to AOPS ******************
    2.         'This will send an email to everyone in the department with the
    3.         'appropriate information.
    4.        
    5.         'Create Outlook object variable
    6.         Dim objOutlook As Object
    7.        
    8.         'Assign Outlook.Application to object variable
    9.         Set objOutlook = CreateObject("Outlook.Application")
    10.        
    11.         'Set objOutlook = GetObject(, "Outlook.Application")
    12.        
    13.         With objOutlook.CreateItem(olMailItem)
    14.             'To: Field of the Email
    15.             .Recipients.Add "[email protected]"
    16.            
    17.             'Subject: Field of the Email
    18.             .Subject = strIssue & ", " & strAlert & ", " & strServer
    19.            
    20.             'Body of the Email
    21.             .Body = strDateTimeStamp & ", " & "Response number: " & strResponse _
    22.                 & Chr$(13) & Chr$(13) & "Comments: " & strComments
    23.            
    24.            
    25.             'Copy message to Outlook Outbox with Send
    26.             .Send
    27.         End With
    28.        
    29.         'Quits Outlook
    30.         'objOutlook.Quit
    31.        
    32.         'Release object variable
    33.         Set objOutlook = Nothing
    34.         '********************************************************************

    My question is, is there a way for me to change this so that instead of it automatically sending the email, it brings up the email in outlook, so that the person can make changes to it before it's sent? The only thing that really needs to be changed is in case they need to add another email address. But how can i do this? Thanks.

    Eric Garrison
    Automated Operations
    Union Planters Bank
    How come it's a penny for your thoughts, but you have to put your 2 cents in? Somebody's makin' a penny

  2. #2
    Frenzied Member
    Join Date
    Jan 2001
    Location
    Newbury, UK
    Posts
    1,878
    use .DISPLAY instead of .SEND

  3. #3
    PowerPoster
    Join Date
    Aug 2000
    Location
    IN SILENCE
    Posts
    6,441

    Well

    Change

    .Send

    to

    .Display

    Remaining quiet down here !!!

    BRAD HAS GIVEN ME THE ULTIMATIVE. I have chosen to stay....

  4. #4

    Thread Starter
    Member
    Join Date
    Sep 2002
    Location
    Cordova, TN
    Posts
    60
    Awesome, it worked perfectly. Thanks guys
    How come it's a penny for your thoughts, but you have to put your 2 cents in? Somebody's makin' a penny

  5. #5
    Hyperactive Member
    Join Date
    Mar 2002
    Posts
    424
    Can I use the MS Outlook object without installing MS Outlook? If so what dll do I need?

  6. #6
    PowerPoster
    Join Date
    Feb 2001
    Location
    Crossroads
    Posts
    3,046
    Originally posted by Ephesians
    Can I use the MS Outlook object without installing MS Outlook? If so what dll do I need?
    MS Outlook has to be installed

  7. #7
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709
    You can use the p & d wizard to install the reference dlls and
    such, but unfortunately if the workstation does not have Outlook
    installed then it is violating the license agreement. So, it can be
    done, but not legally. The user would not be able to bring up a
    working stand alone version, but he would not be licensed.
    Last edited by RobDog888; Apr 28th, 2003 at 04:09 PM.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

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