Link to home
Start Free TrialLog in
Avatar of AJDeveloper
AJDeveloper

asked on

automate outlook 2007 from visual basic 2005

How to automate outlook 2007 from visual basic 2005 without creating addin and how can create folder in outlook or apply rule ,any idea what is the code
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

What is it exactly that you are trying to do? You could use Office interop for Office 2007.
Avatar of AJDeveloper
AJDeveloper

ASKER

i need code to automate outlook 2007 form visual basic and being able to create folders ,add rules ,stuff like this ,i dont want to add addin
what is the code needed to automate outlook 2007 from visual basic 2005
I run the code :

 Dim oOutlook As Outlook.Application
        oOutlook = CreateObject("outlook.application", "localhost")

Im getting the error "cant create activex component"
Are you doing that in ASP.NET?
No ,im using visual basic 2005 ,windows application
ASKER CERTIFIED SOLUTION
Avatar of Nasir Razzaq
Nasir Razzaq
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I try,but im getting the error 'Retrieving the COM class factory for component with CLSID {0006F03A-0000-0000-C000-000000000046} failed due to the following error: 80080005'
Have you installed the "Microsoft Office 2007 Primary Interop Assemblies"?
I will check and update you
Thanks a lot ,it worked ,but still i cant create folder and getting error
Now its down to you to explore ways of doing what you are trying to do. If it does not allow creation of folders then probably its not supported at all because this is the all in one Office API.
and one more thing ,why when outlook is opened ,the code doesnt run ,and it give back the same error as before
It should not actually. I use this code all the time and right now i am working on the form which uses this code to create tasks in Outlook. My outlook is open and the code is working and if the outlook is closed, executing the code opens the outlook.
the error "Convertation program could not open the file" is received when trying to open Excel 2007 in excel 2007 ,although compatiblity tool is installed on the machine ,any idea
Please ignore my last comment