Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VC10.0
How to import these dll's in visual studio 2010 and using outlook 2010? Please help me?
 
#import "C:\Program Files\Microsoft Visual Studio 10.0\Common7\Packages\vwd\mso.dll"
  rename_namespace( "Office" ),raw_interfaces_only, named_guids using namespace Office;
#import "C:\Program Files\Microsoft Office\Office14\MSOUTL.olb"
rename_namespace( "Outlook" ), raw_interfaces_only,
named_guids using namespace Outlook;
 
1>------ Rebuild All started: Project: Synergyaddin, Configuration: Debug Win32 ------
1>Build started 6/19/2012 4:46:11 PM.
1>_PrepareForClean:
1> Deleting file "Debug\Synergyaddin.lastbuildstate".
1>InitializeBuildStatus:
1> Touching "Debug\Synergyaddin.unsuccessfulbuild".
1>Midl:
1> Synergyaddin.idl
1> Processing .\Synergyaddin.idl
1> oaidl.idl
1> Processing C:\Program Files\Microsoft SDKs\Windows\v7.0A\include\oaidl.idl
1> objidl.idl
1> Processing C:\Program Files\Microsoft SDKs\Windows\v7.0A\include\objidl.idl
1> unknwn.idl
1> Processing C:\Program Files\Microsoft SDKs\Windows\v7.0A\include\unknwn.idl
1> wtypes.idl
1> Processing C:\Program Files\Microsoft SDKs\Windows\v7.0A\include\wtypes.idl
1> basetsd.h
1> Processing C:\Program Files\Microsoft SDKs\Windows\v7.0A\include\basetsd.h
1> guiddef.h
1> Processing C:\Program Files\Microsoft SDKs\Windows\v7.0A\include\guiddef.h
1> ocidl.idl
1> Processing C:\Program Files\Microsoft SDKs\Windows\v7.0A\include\ocidl.idl
1> oleidl.idl
1> Processing C:\Program Files\Microsoft SDKs\Windows\v7.0A\include\oleidl.idl
1> servprov.idl
1> Processing C:\Program Files\Microsoft SDKs\Windows\v7.0A\include\servprov.idl
1> urlmon.idl
1> Processing C:\Program Files\Microsoft SDKs\Windows\v7.0A\include\urlmon.idl
1> msxml.idl
1> Processing C:\Program Files\Microsoft SDKs\Windows\v7.0A\include\msxml.idl
1> shobjidl.idl
1> Processing C:\Program Files\Microsoft SDKs\Windows\v7.0A\include\shobjidl.idl
1> docobj.idl
1> Processing C:\Program Files\Microsoft SDKs\Windows\v7.0A\include\docobj.idl
1> shtypes.idl
1> Processing C:\Program Files\Microsoft SDKs\Windows\v7.0A\include\shtypes.idl
1> comcat.idl
1> Processing C:\Program Files\Microsoft SDKs\Windows\v7.0A\include\comcat.idl
1> propidl.idl
1> Processing C:\Program Files\Microsoft SDKs\Windows\v7.0A\include\propidl.idl
1> prsht.idl
1> Processing C:\Program Files\Microsoft SDKs\Windows\v7.0A\include\prsht.idl
1> propsys.idl
1> Processing C:\Program Files\Microsoft SDKs\Windows\v7.0A\include\propsys.idl
1> StructuredQueryCondition.idl
1> Processing C:\Program Files\Microsoft SDKs\Windows\v7.0A\include\StructuredQueryCondition.idl
1> ObjectArray.idl
1> Processing C:\Program Files\Microsoft SDKs\Windows\v7.0A\include\ObjectArray.idl
1> oaidl.acf
1> Processing C:\Program Files\Microsoft SDKs\Windows\v7.0A\include\oaidl.acf
1> ocidl.acf
1> Processing C:\Program Files\Microsoft SDKs\Windows\v7.0A\include\ocidl.acf
1>ClCompile:
1> stdafx.cpp
1>c:\users\gokulnath\documents\visual studio 2010\projects\synergyaddin\synergyaddin\stdafx.h(49): warning C4278: 'RGB': identifier in type library 'C:\Program Files\Microsoft Visual Studio 10.0\Common7\Packages\vwd\mso.dll' is already a macro; use the 'rename' qualifier
1>c:\users\gokulnath\documents\visual studio 2010\projects\synergyaddin\synergyaddin\stdafx.h(49): warning C4278: 'RGB': identifier in type library 'C:\Program Files\Microsoft Visual Studio 10.0\Common7\Packages\vwd\mso.dll' is already a macro; use the 'rename' qualifier
1>c:\users\gokulnath\documents\visual studio 2010\projects\synergyaddin\synergyaddin\stdafx.h(49): warning C4278: 'DocumentProperties': identifier in type library 'C:\Program Files\Microsoft Visual Studio 10.0\Common7\Packages\vwd\mso.dll' is already a macro; use the 'rename' qualifier
1>c:\users\gokulnath\documents\visual studio 2010\projects\synergyaddin\synergyaddin\stdafx.h(49): warning C4278: 'RGB': identifier in type library 'C:\Program Files\Microsoft Visual Studio 10.0\Common7\Packages\vwd\mso.dll' is already a macro; use the 'rename' qualifier
1>c:\users\gokulnath\documents\visual studio 2010\projects\synergyaddin\synergyaddin\stdafx.h(49): warning C4278: 'RGB': identifier in type library 'C:\Program Files\Microsoft Visual Studio 10.0\Common7\Packages\vwd\mso.dll' is already a macro; use the 'rename' qualifier
1>c:\users\gokulnath\documents\visual studio 2010\projects\synergyaddin\synergyaddin\stdafx.h(49): warning C4278: 'RGB': identifier in type library 'C:\Program Files\Microsoft Visual Studio 10.0\Common7\Packages\vwd\mso.dll' is already a macro; use the 'rename' qualifier
1>c:\users\gokulnath\documents\visual studio 2010\projects\synergyaddin\synergyaddin\stdafx.h(50): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\gokulnath\documents\visual studio 2010\projects\synergyaddin\synergyaddin\stdafx.h(50): error C2440: 'initializing' : cannot convert from 'const char [7]' to 'int'
1> There is no context in which this conversion is possible
1>c:\users\gokulnath\documents\visual studio 2010\projects\synergyaddin\synergyaddin\stdafx.h(50): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\gokulnath\documents\visual studio 2010\projects\synergyaddin\synergyaddin\stdafx.h(50): error C2143: syntax error : missing ';' before 'using'
1>c:\users\gokulnath\documents\visual studio 2010\projects\synergyaddin\synergyaddin\stdafx.h(50): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\gokulnath\documents\visual studio 2010\projects\synergyaddin\synergyaddin\stdafx.h(51): warning C4278: 'CopyFile': identifier in type library 'C:\Program Files\Microsoft Office\Office14\MSOUTL.olb' is already a macro; use the 'rename' qualifier
1>c:\users\gokulnath\documents\visual studio 2010\projects\synergyaddin\synergyaddin\stdafx.h(51): warning C4278: 'PlaySound': identifier in type library 'C:\Program Files\Microsoft Office\Office14\MSOUTL.olb' is already a macro; use the 'rename' qualifier
1>c:\users\gokulnath\documents\visual studio 2010\projects\synergyaddin\synergyaddin\debug\msoutl.tlh(6678): error C2146: syntax error : missing ';' before identifier 'PickerDialog'
1>c:\users\gokulnath\documents\visual studio 2010\projects\synergyaddin\synergyaddin\debug\msoutl.tlh(6678): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\gokulnath\documents\visual studio 2010\projects\synergyaddin\synergyaddin\debug\msoutl.tlh(6678): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\gokulnath\documents\visual studio 2010\projects\synergyaddin\synergyaddin\debug\msoutl.tlh(6763): error C2146: syntax error : missing ';' before identifier 'GetPickerDialog'
1>c:\users\gokulnath\documents\visual studio 2010\projects\synergyaddin\synergyaddin\debug\msoutl.tlh(6763): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\gokulnath\documents\visual studio 2010\projects\synergyaddin\synergyaddin\debug\msoutl.tlh(6763): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\gokulnath\documents\visual studio 2010\projects\synergyaddin\synergyaddin\debug\msoutl.tlh(6763): warning C4183: 'GetPickerDialog': missing return type; assumed to be a member function returning 'int'
1>c:\users\gokulnath\documents\visual studio 2010\projects\synergyaddin\synergyaddin\debug\msoutl.tlh(6984): error C2146: syntax error : missing ';' before identifier 'CreateContactCard'
1>c:\users\gokulnath\documents\visual studio 2010\projects\synergyaddin\synergyaddin\debug\msoutl.tlh(6984): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\gokulnath\documents\visual studio 2010\projects\synergyaddin\synergyaddin\debug\msoutl.tlh(6985): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\gokulnath\documents\visual studio 2010\projects\synergyaddin\synergyaddin\debug\msoutl.tlh(6985): warning C4183: 'CreateContactCard': missing return type; assumed to be a member function returning 'int'
1>c:\users\gokulnath\documents\visual studio 2010\projects\synergyaddin\synergyaddin\debug\msoutl.tlh(20856): error C2556: 'Outlook::AddressEntryPtr Outlook::_AppointmentItem::GetOrganizer(void)' : overloaded function differs only by return type from '_bstr_t Outlook::_AppointmentItem::GetOrganizer(void)'
1> c:\users\gokulnath\documents\visual studio 2010\projects\synergyaddin\synergyaddin\debug\msoutl.tlh(20754) : see declaration of 'Outlook::_AppointmentItem::GetOrganizer'
1>c:\users\gokulnath\documents\visual studio 2010\projects\synergyaddin\synergyaddin\debug\msoutl.tlh(20856): error C2371: 'Outlook::_AppointmentItem::GetOrganizer' : redefinition; different basic types
1> c:\users\gokulnath\documents\visual studio 2010\projects\synergyaddin\synergyaddin\debug\msoutl.tlh(20754) : see declaration of 'Outlook::_AppointmentItem::GetOrganizer'
1>c:\users\gokulnath\documents\visual studio 2010\projects\synergyaddin\synergyaddin\debug\msoutl.tlh(27422): error C2143: syntax error : missing ';' before 'Outlook::_Application::GetPickerDialog'
1>c:\users\gokulnath\documents\visual studio 2010\projects\synergyaddin\synergyaddin\debug\msoutl.tlh(27422): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\gokulnath\documents\visual studio 2010\projects\synergyaddin\synergyaddin\debug\msoutl.tlh(27422): error C2497: 'PickerDialogPtr' : 'implementation_key' can only be applied to function declarations
1>c:\users\gokulnath\documents\visual studio 2010\projects\synergyaddin\synergyaddin\debug\msoutl.tlh(27422): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\gokulnath\documents\visual studio 2010\projects\synergyaddin\synergyaddin\debug\msoutl.tlh(27468): error C2143: syntax error : missing ';' before 'Outlook::_NameSpace::CreateContactCard'
1>c:\users\gokulnath\documents\visual studio 2010\projects\synergyaddin\synergyaddin\debug\msoutl.tlh(27468): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\gokulnath\documents\visual studio 2010\projects\synergyaddin\synergyaddin\debug\msoutl.tlh(27468): error C2497: 'ContactCardPtr' : 'implementation_key' can only be applied to function declarations
1>c:\users\gokulnath\documents\visual studio 2010\projects\synergyaddin\synergyaddin\debug\msoutl.tlh(27468): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\gokulnath\documents\visual studio 2010\projects\synergyaddin\synergyaddin\debug\msoutl.tlh(30009): error C2556: 'Outlook::AddressEntryPtr Outlook::_AppointmentItem::GetOrganizer(void)' : overloaded function differs only by return type from '_bstr_t Outlook::_AppointmentItem::GetOrganizer(void)'
1> c:\users\gokulnath\documents\visual studio 2010\projects\synergyaddin\synergyaddin\debug\msoutl.tlh(20754) : see declaration of 'Outlook::_AppointmentItem::GetOrganizer'
1>c:\users\gokulnath\documents\visual studio 2010\projects\synergyaddin\synergyaddin\debug\msoutl.tlh(30009): error C2371: 'Outlook::_AppointmentItem::GetOrganizer' : redefinition; different basic types
1> c:\users\gokulnath\documents\visual studio 2010\projects\synergyaddin\synergyaddin\debug\msoutl.tlh(20754) : see declaration of 'Outlook::_AppointmentItem::GetOrganizer'
1>c:\users\gokulnath\documents\visual studio 2010\projects\synergyaddin\synergyaddin\stdafx.h(52): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\gokulnath\documents\visual studio 2010\projects\synergyaddin\synergyaddin\stdafx.h(52): error C2374: 'rename_namespace' : redefinition; multiple initialization
1> c:\users\gokulnath\documents\visual studio 2010\projects\synergyaddin\synergyaddin\stdafx.h(50) : see declaration of 'rename_namespace'
1>c:\users\gokulnath\documents\visual studio 2010\projects\synergyaddin\synergyaddin\stdafx.h(52): error C2440: 'initializing' : cannot convert from 'const char [8]' to 'int'
1> There is no context in which this conversion is possible
1>c:\users\gokulnath\documents\visual studio 2010\projects\synergyaddin\synergyaddin\stdafx.h(52): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\gokulnath\documents\visual studio 2010\projects\synergyaddin\synergyaddin\stdafx.h(52): error C2086: 'int raw_interfaces_only' : redefinition
1> c:\users\gokulnath\documents\visual studio 2010\projects\synergyaddin\synergyaddin\stdafx.h(50) : see declaration of 'raw_interfaces_only'
1>c:\users\gokulnath\documents\visual studio 2010\projects\synergyaddin\synergyaddin\stdafx.h(53): error C2143: syntax error : missing ';' before 'using'
1>c:\users\gokulnath\documents\visual studio 2010\projects\synergyaddin\synergyaddin\stdafx.h(53): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\gokulnath\documents\visual studio 2010\projects\synergyaddin\synergyaddin\stdafx.h(53): error C2086: 'int named_guids' : redefinition
1> c:\users\gokulnath\documents\visual studio 2010\projects\synergyaddin\synergyaddin\stdafx.h(50) : see declaration of 'named_guids'
1>
1>Build FAILED.
1>
1>Time Elapsed 00:00:06.57
2>------ Skipped Rebuild All: Project: SynergyaddinPS, Configuration: Debug Win32 ------
2>Project not selected to build for this solution configuration
========== Rebuild All: 0 succeeded, 1 failed, 1 skipped ==========
Posted 19-Jun-12 2:21am
Edited 19-Jun-12 2:22am
v2

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

I know its too late for a reply but am working on something similar and when saw the same issue ; realised why not update this post for someone like me Smile | :)
 
Please update the import statement to include the mso.dll's path for the version you are interested in as below for 2010 and 2013 resp.
 
#import "C:\\Program Files (x86)\\Common Files\\microsoft shared\\OFFICE14\\mso.dll" no_namespace rename("RGB", "MsoRGB") exclude("IAccessible")
 
#import "C:\\Program Files (x86)\\Com
mon Files\\microsoft shared\\OFFICE15\\mso.dll" no_namespace rename("RGB", "MsoRGB") exclude("IAccessible")
 
ref:
http://support.microsoft.com/kb/220600.
 
http://social.msdn.microsoft.com/Forums/office/en-US/69aed44a-902f-4db9-8ff8-6205326f065d/outlook-2007-email-automation-from-cmfc-vs2010?forum=outlookdev
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 277
1 Maciej Los 210
2 BillWoodruff 205
3 Jochen Arndt 180
4 DamithSL 165
0 OriginalGriff 5,130
1 DamithSL 4,157
2 Maciej Los 3,670
3 Kornfeld Eliyahu Peter 3,470
4 Sergey Alexandrovich Kryukov 2,821


Advertise | Privacy | Mobile
Web04 | 2.8.141216.1 | Last Updated 11 Apr 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100