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
Didn't work after some more research i found the Events in the Script EditorCode:Sub TextBox1_LostFocus msgbox("Testing") End Sub
So i tried filling a textbox on send, read open with the following
Still nothing but i was told this code wouldn't work as it is not "instanciated"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
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




Reply With Quote