Results 1 to 5 of 5

Thread: Textbox Event Outlook

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2006
    Posts
    736

    Textbox Event Outlook

    Hi guys

    Another problem was hoping that Textbox in Outlook had a gotfocus/lostfocus,
    as it doesn't i am looking for a way to fire an event in a similar way the event i want to do is quite simple for normal VB but as so far every thing i have done in VBA outlook isn;t simple ill ask this question at the same time, i want to strip the carraige returns from a textbox. aslong as this event is dont before the email is actually sent it really doesn't mater as long as its done as or before it goes.

    any help would be appreciated as thus far what i thought would be a simple excorcise has been *(87((&*%^&*

  2. #2

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2006
    Posts
    736

    Re: Textbox Event Outlook

    This doesn't work any ideas? no errors just the text isn't in the textbox when the mail is recieved

    Code:
    Function Item_Send()
    Set objPage = Item.GetInspector.ModifiedFormPages("P.2")
    Set objControl = objPage.Controls("TextBox1")
    objControl.value = "Nope neither Maybe because its based on a template BaBladeBla."
    End Function

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

    Re: Textbox Event Outlook

    Outlook Forms use VB Script and there are some events but have you tried writting a lost focus event? Use the script editor nehind the Form. See this FAQ for details: http://www.vbforums.com/showthread.php?t=402088

    The Item is not instanciated so it wont work.
    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

  4. #4

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2006
    Posts
    736

    Re: Textbox Event Outlook

    Thanks for reply I have already visited that tutorial it does not mention events in any deatil other than _click, and yes i tried TextBox1_LostFocus

  5. #5

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2006
    Posts
    736

    Re: Textbox Event Outlook

    From a quick google instinciated is declare the outlook?

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