I used to generate Excel macros by a recording feature, and then edit the resulting VBA code. But Outlook 2000 stymies me. There's no "record a macro" feature.
I wanted a macro that when run, produces a new mail item, with no signature or subject, and with the recipient address already entered in the To line ... so I could then type in a short message and just click send. This seemed the quickest way to email-page my coworker.
The macro I made from samples on the net looks like this:
Sub PageCoworker()
' MsgBox FormatDateTime(Now, vbLongDate)
Dim olApp As Outlook.Application
Set olApp = CreateObject("Outlook.Application")
Dim olMail As Outlook.MailItem
Set olMail = olApp.CreateItem(olMailItem)
olMail.To = "1235551234@somepagingservice.com"
olMail.Subject = ""
olMail.Body = "TEST"
End Sub
... but when run, produces a couple of seconds of hourglass and then nothing. The test line runs when I enable it, so the macro is actually running.
What's wrong with this code? My Outlook macro security setting is LOW (I'm on an intranet).
I wanted a macro that when run, produces a new mail item, with no signature or subject, and with the recipient address already entered in the To line ... so I could then type in a short message and just click send. This seemed the quickest way to email-page my coworker.
The macro I made from samples on the net looks like this:
Sub PageCoworker()
' MsgBox FormatDateTime(Now, vbLongDate)
Dim olApp As Outlook.Application
Set olApp = CreateObject("Outlook.Application")
Dim olMail As Outlook.MailItem
Set olMail = olApp.CreateItem(olMailItem)
olMail.To = "1235551234@somepagingservice.com"
olMail.Subject = ""
olMail.Body = "TEST"
End Sub
... but when run, produces a couple of seconds of hourglass and then nothing. The test line runs when I enable it, so the macro is actually running.
What's wrong with this code? My Outlook macro security setting is LOW (I'm on an intranet).