M
Mark Milliman
I have customized Outlook Today to my liking. Everything worked great under
Outlook 2003, but not with Outlook 2007. I tested all of my other macros
created under previous versions of Outlook and they work fine even the ones
that use CDO and Redemption. My simpliest scripts do not work and I cannot
figure out why.
I have created a new web page in OUTLWVW.DLL that formats my appointements,
tasks, links, and other things the way I want. There are two simple buttons
on this page that call a VBScript that are suppose to open a message window
from either one of my e-mail accounts. I had a convoluted way of doing this
in previous versions of Outlook, but Outlook 2007 now adds SendUsingAccount.
The problem is that I can no longer create a new message item. I have tried
several ways but none of them work. Here are the three methods I have
already attempted:
Method 1:
<script for="btnSndComcast" event="onClick" language="VBScript">
Set objMsg = ThisOutlookSession.CreateItem(olMailItem)
objMsg.SendUsingAccount = ThisOutlookSession.Session.Accounts(1)
objMsg.Display
</script>
Method 2:
<script for="btnSndInphotonics" event="onClick" language="VBScript">
Set objMsg = Application.CreateItem(olMailItem)
objMsg.SendUsingAccount = Application.Session.Accounts(2)
objMsg.Display
</script>
Method 3:
Set oApp = CreateObject("Outlook.Application")Set objMsg =
oApp.CreateItem(olMailItem)objMsg.SendUsingAccount =
oApp.Session.Accounts(2)objMsg.Display Methods 1 and 2 produce the same
results: Object required: 'ThisOutlookSession' Method 3 says that ActiveX
cannot create object. I cannot figure out what is going on here. It use to
work under Outlook 2003 with Method 3. I verified it on another machine
that has not been upgraded to Outlook 2007. Did something change in the
object model in Outlook 2007 that requires me to do more? Please
help.Thanks,Mark Milliman
Outlook 2003, but not with Outlook 2007. I tested all of my other macros
created under previous versions of Outlook and they work fine even the ones
that use CDO and Redemption. My simpliest scripts do not work and I cannot
figure out why.
I have created a new web page in OUTLWVW.DLL that formats my appointements,
tasks, links, and other things the way I want. There are two simple buttons
on this page that call a VBScript that are suppose to open a message window
from either one of my e-mail accounts. I had a convoluted way of doing this
in previous versions of Outlook, but Outlook 2007 now adds SendUsingAccount.
The problem is that I can no longer create a new message item. I have tried
several ways but none of them work. Here are the three methods I have
already attempted:
Method 1:
<script for="btnSndComcast" event="onClick" language="VBScript">
Set objMsg = ThisOutlookSession.CreateItem(olMailItem)
objMsg.SendUsingAccount = ThisOutlookSession.Session.Accounts(1)
objMsg.Display
</script>
Method 2:
<script for="btnSndInphotonics" event="onClick" language="VBScript">
Set objMsg = Application.CreateItem(olMailItem)
objMsg.SendUsingAccount = Application.Session.Accounts(2)
objMsg.Display
</script>
Method 3:
Set oApp = CreateObject("Outlook.Application")Set objMsg =
oApp.CreateItem(olMailItem)objMsg.SendUsingAccount =
oApp.Session.Accounts(2)objMsg.Display Methods 1 and 2 produce the same
results: Object required: 'ThisOutlookSession' Method 3 says that ActiveX
cannot create object. I cannot figure out what is going on here. It use to
work under Outlook 2003 with Method 3. I verified it on another machine
that has not been upgraded to Outlook 2007. Did something change in the
object model in Outlook 2007 that requires me to do more? Please
help.Thanks,Mark Milliman