Reputation: 227
I am trying to make a application which converts docx/xls/ppt to pdf.
I successfully converted 1 and 2 separately but when i try to merge both of them i.e
when i try to add both the reference (Microsoft.Office.core dll and Office.dll) together it gives me error.
so, is there any problem in adding both the dll's ?
229 error of same Kind ---- Error 1 Cannot embed interop type 'Microsoft.Office.Core.MsoBlogImageType' found in both assembly 'e:\All Pdf\waterMark_PDF\PDF Merger and Protector Source Code\PDFMerger\obj\Debug\Interop.Microsoft.Office.Core.dll' and 'c:\Program Files\Microsoft Visual Studio 10.0\Visual Studio Tools for Office\PIA\Office12\Office.dll'. Consider setting the 'Embed Interop Types' property to false.
Note - i had changed "Embed Interop Types" property to false for both dll's.
please help.
Upvotes: 1
Views: 486
Reputation: 371
Just use the specific libraries:
using Excel = Microsoft.Office.Interop.Excel;
using Word = Microsoft.Office.Interop.Word;
using Power = Microsoft.Office.Interop.PowerPoint;
They should have everything you need along with not having namespace isssues between interlocking dll's
These are found as COM references
EDIT: Also, are you using correct namespaces? If you could post some code it would be helpful.
Upvotes: 1