Is there a way to record a macro in outlook (lets say 2003)?
No, you can not record a macro in Outlook.
You can write macros in Outlook by going to the Tools menu, point to Macro, and then click Macros.
In the Macro name box, type a name for your macro, and then click Create. The Microsoft Visual Basic Editor opens.
Type or paste your code into the code window of the module.
But, as I said, you cannot record a macro in Outlook.
Hello Hack,
I know how to write macros in outlook - well i started to do that only today...
but i was looking for the record new macro line and didnt find it - you just answered my question.
I wonder why you cant record a macro in outlook like you do in excel...
Hello Hack,
I know how to write macros in outlook - well i started to do that only today...
but i was looking for the record new macro line and didnt find it - you just answered my question.
I wonder why you cant record a macro in outlook like you do in excel...
Thank you for your reply,
ERAN
For reasons known only to Microsoft, the VBA capabilities of Outlook (all versions) has been well below the VBA capabilities of all of the other Office products.
It does make you just sit back and shake your head!
Outlook can be considered to have more advanced VBA support then all other Office suite app with only Excel as a close competitor. Maybe Outlook doesnt allow you to record a macro because of security reasons and spam, virus', etc. The Forms support alone is far far better then any Office VBA Forms capabilities combined. I could go on and on but anyways...
Is there something in particular you need to do that you needed to record a macro?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
...
Is there something in particular you need to do that you needed to record a macro?
Hello RobDog888,
Nothing special...just wanted to know if i can programmaticaly create a button .
i know how to do it semi automatic:
1)create the code for the button
2)Choose View | Toolbars | Customize.
In the Customize dialog, go to the Commands tab.
Under Categories, select Macros.
Drag the Project1.myMacro macro command to the desired toolbar.
Right-click on the new Project1.myMacro toolbar button, then change the Name or button appearance as desired.
Close the Customize dialog.
Hello RobDog888 thank you for your reply!!!
I just want to know where exactly to place this code and how to save it.
do i save it as a dll or somthing like that.
i new to this outlook programming so sorry for asking maybe stupid questions...
Ok, no prob. For this example you need to open Outlook and press Alt + F11 to open the VBA IDE. Then inside "ThisOutlookSession" you can paste all the code. Save the class and close Outlook. Re-open it and click the tools menu > Save Email As... and you will get your event to fire. In this example its a msgbox.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
Hello RobDog888,
There is somthing i still dont understand:
where is the tools menu with the option of save email as?
i did everything you said,but i cant find this tools menu...what is wrong?
Hello RobDog888,
Well, in my tools menu i have everything except speech and save email as ...
I went to View->ToolBars and searched for these two but nothing...
What is wrong with my outlook version (2003(11.5608.5606))?
Did you paste the code into "ThisOutlookSession" class, enable macros, and restart Outlook?
Also, it looks like you dont have Service Pack 1 for Outlook/Office installed. You may want to eventually do an Office Update.
Edit: Make sure you have the reference to MS Office 11.0 Object Library. And you did say your running 2003?
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum.
See if the Tools control is spelled the same and present.
Hello RobDog888,
OK It's working!!!
two things:
1)I forgot to tell you i'm using the hebrew version - that is why &tools is not recognized because the name is in hebrew.
2)Debug.Print Application.ActiveExplorer.CommandBars("Menu Bar").Controls(1).Caption ->i got an error when tried to use Name
Thank you so much for your help!!!
Now i'll go and find how to do this from vb ->write a DLL That will be loaded when outlook launches.
Best Regards,
ERAN
p.s.
I gave it a resolved title but if you can please send me the other code we talked about ( toolbar example )...