Results 1 to 1 of 1

Thread: Outlook 2003 Code help

Threaded View

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Nov 2006
    Posts
    736

    Outlook 2003 Code help

    Ok i have posted a couple of questions here and i think i may of been completly off track i am hoping some one can give me some definitive answers

    In outlook 2003 choose deign form, add controls, then view code to add the code.
    hopefully i am right thus far.
    Now its the code that i can use that is getting confusing, i thought all office Apps coded with VBA? is that correct?

    i have done some googling to try to find the answers to some questions and find different Styles of code being replied.

    an i right you can use VBScript?

    Anyway i will move on, I want to do some thing i could do in seconds in VB6 and in Excel too but for the life of me its like being back in the dark age with Outlook, the editor isn't intelligent can't even right click it and copy code.

    So heres what i wanted to do. Atfirst i wanted to use a textbox getfocus & lost focus to strip the text in the box of VBCRLF. i tried the following To test the Trigger Event it didn't work

    Code:
    Sub TextBox1_LostFocus
    msgbox("Testing")
    End Sub
    Didn't work after some more research i found the Events in the Script Editor

    So i tried filling a textbox on send, read open with the following

    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."
    End Function
    Still nothing but i was told this code wouldn't work as it is not "instanciated"
    What on earth is this? I was also told i could Use the Get & Lost Focus events so maybe my code was wrong any ideas?

    So could some one please please give me some clarifacation as to the type of code i can use and maybe a simple some simple examples of firing events that actaully work.

    also if there is going to be any major differnece to the following in outlook a pointer there would be good

    Code:
    Sub ExampleFiredEvent()
    Item.GetInspector.ModifiedFormPages("P.2").TextBox1.value = Replace(Item.GetInspector.ModifiedFormPages("P.2").TextBox1.value, VBCRLF,"")
    End Sub
    Last edited by nabbster; Feb 2nd, 2008 at 07:09 AM.

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