Results 1 to 4 of 4

Thread: [OUTLOOK] Trying to use SendKeys

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 2009
    Location
    Oregon
    Posts
    60

    [OUTLOOK] Trying to use SendKeys

    This is kind of an addendum to my last thread titled "Trying to run sub on Send"

    I thought of a way around my issue and it is this...SendKeys. I am not familiar with the syntax of this so I am asking for a little help.

    I have developed a macro for fixing name formats in Outlook that the Check Names feature won't correct, but my problem that I can't seem to get around is the Check Names dialog box. I thought that if I could send an ENTER that it would close the dialog box and allow my code to run.

    Any help would be greatly appreciated.

    Thanks,
    Garrett

  2. #2
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: [OUTLOOK] Trying to use SendKeys

    Nope, wont work. The dialog is modal so no other processing of your vba code will execute until the dialog is dismissed.

    Yo would have to write an ActiveX out of process exe and invoke it before th dialog popups.
    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

  3. #3

    Thread Starter
    Member
    Join Date
    Jul 2009
    Location
    Oregon
    Posts
    60

    Re: [OUTLOOK] Trying to use SendKeys

    Thank you for the reply and saving me hours trying to get it to work when it never would have. I will see if I have any tools to do any ActiveX work at my work PC, but not sure that will be the case as I am not a Developer and don't have all the software that one should have. I am just a project assistant with an active imagination for solving problems with code.

    Garrett

  4. #4
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: [OUTLOOK] Trying to use SendKeys

    Yea you wont be able to do it with VBA as it will all be in same process thread. You may want to look at creating a timer as that would be the next thing to look at before an activex exe
    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