Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear All,
I have macro which exports chart as image in outlook.It perfectly works but the problem is, it works when outlook is opened otherwise it treminates.
My need is when I click on button outlook should open with exported chars as image .
Please find the attached application.
I think the access on the outlook-library in "myApp.CreateItem(olMailItem)" failed. You could use an extra batch to open outlook before the mainpart runs.
Set oShell = WScript.CreateObject("WScript.Shell")
oShell.Run "C:\
StartOutlookPerBatch.bat"
Content Batch:
cmd /C "C:\Program Files (x86)\Microsoft Office\Office14\OUTLOOK.EXE"
- Marcus
Hi Marcus,
Thanks for the reply.
I am trying to achieve this as per your suggestion but it's not working. If it is working on your side then please send me that macro.
Regards
Kush
In my case it works, after a small change from:
Set oShell = WScript.CreateObject("WScript.Shell")
to
Set oShell = CreateObject("WScript.Shell")
Also check your office release, because the path to outlook is different:
2003:
cmd /C "C:\Programme\Microsoft Office\OFFICE11\OUTLOOK.EXE"
2010:
cmd /C "C:\Program Files (x86)\Microsoft Office\Office14\OUTLOOK.EXE"
- Marcus
Hi Marcus,
Still it's not working. I have checked outlook path also. Everything is fine. Not getting what is issue.
Can you send me entire macro with application.
Regards,
Kushal
Hi Kushal,
here your changed app back. Works the batchfile standalone?
- Marcus