Missing Microsoft Office 15.0 Object Library

Missing Microsoft Office 15.0 Object Library

rcolon9E4ZX
Advocate Advocate
83,625 Views
6 Replies
Message 1 of 7

Missing Microsoft Office 15.0 Object Library

rcolon9E4ZX
Advocate
Advocate

A friend of mine is missing the Microsoft Office XX.0 Object Library. He has office 2016 installed. He is using a code that I generated to export a bill of materials from Inventor to excel. A reference to the Microsoft Office XX.0 Object Library is required. This object Library is not present in the References window (VBA>Tools>References). Is there a way to download another/find in his directory?. Would I be able to give him a copy of my object library? If so, what would be the filename for the library?

 

Any help with this would be much appreciated.

0 Likes
Accepted solutions (1)
83,626 Views
6 Replies
Replies (6)
Message 2 of 7

HermJan.Otterman
Advisor
Advisor

with Office 2016 installed, you should have:

- Microsoft Excel 16.0 object Library

- Microsoft Office 16.0 object Library.

- (Mircosoft Visuabasic for applications Extensibility 5.3)

what did you install first? Office or Inventor? best is Office first!

If this answers your question then please select "Accept as Solution"
Kudo's are also appreciated Smiley Wink

Succes on your project, and have a nice day

Herm Jan


Message 3 of 7

Owner2229
Advisor
Advisor

Hey, you don't need the Excel Library at all. Just change your code to late binding and you don't need to worry which version of Excel is installed.

 

Dim objExcelApp As Object
Set objExcelApp = CreateObject("Excel.Application")
Dim wb As Object
Set wb = objExcelApp.Workbooks.Open("path to my workbook")
Dim ws As Object
Set ws = wb.Sheets(1)

'First is row, then Column ws.Cells(1, 1).Value = "Hello" ws.Cells(1, 2).Value = "World" 'Close the workbook
wb.Save wb.Close
wb = Nothing
objExcelApp = Nothing
Consider using "Accept as Solution" / "Kudos" if you find this helpful.
- - - - - - - - - - - - - - -
Regards,
Mike

"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - John F. Woods
Message 4 of 7

rcolon9E4ZX
Advocate
Advocate
Accepted solution

I originally had office 2013 and then inventor. I recently upgraded to office 2016, so the sequence of actions may have been the cause for the object library missing from the references window.

 

I figured it out though. The main issue I was having was determining the location and name of the dll file. For me, the object library was only missing from the references window while using vba editor in Inventor. When I open up excel and pull up its vba window, the object library was not missing from the list.

 

So I clicked on the Microsoft Office 16.0 Object Library from the excel vba references window and it shows the full file path. But it cuts off before the end. I had a nightmare with this and Microsoft help chat/calls. 

 

The next morning I opened Visual Studio 2015 and opened a Visual Basic > Windows > Classic Desktop > Console Application. From the Solution Explorer, I right clicked References > Add Reference. A window came up with an extensive list of object libraries. I found the Microsoft Office 16.0 Object Library that I was looking for, and when I put the cursor over the listed object library, it displayed the full path and file name uncut and uncensored.

 

Finally, I went back into the inventor vba window > Tools > References. I then clicked browse in the new window and found my dll file. It was named Office once it was in the References window. I closed the references window and reopened it to find the Microsoft Office 16.0 Object Library just as it should be. All of this just so I can create File Dialogs!

 

Anyways, I can't imagine I am the only one in the world who had or is having this issue with an object library. For Office 2016, here is the full file path, which I imagine will be the same for any user because I believe it is a default directory:

 

"C:\Program Files\Microsoft Office\Root\VFS\ProgramFilesCommonX86\Microsoft Shared\OFFICE16\MSO.dll"

 

This is for the Microsoft Office 16.0 Object Library.

 

If anyone is having a similar issue with an object library and they know it is on their computer somewhere, employ the aforementioned method using Visual Studio 2015; Community Edition should work fine.

 

I can't stress how much of a nightmare this was for me and how much time I spent searching for this. Now I know and I want to make sure others can know too.

 

Good Luck to all and Happy New Year.

Message 5 of 7

rcolon9E4ZX
Advocate
Advocate

HermJan.Otterman,

 

I also noticed your reply about extruding with VBA. I will review and implement at work tomorrow. However, it looks very promising.

 

Thank you

0 Likes
Message 6 of 7

Anonymous
Not applicable

I am having issues adding the Microsoft Excel 16.0 library.

I think I don't even have the dll file in my computer as I can only find the Office 15.0 folder

"C:\Program Files\Microsoft Office 15\root\office15"

 

Is there any way I can download this library somewhere? I can't just find it online.

0 Likes
Message 7 of 7

rcolon9E4ZX
Advocate
Advocate

tdpnill,

 

I checked the VBA Editor in Excel 2013 > Tools > References for the Microsoft Excel 15.0 Object Library. See image.

Microsoft Excel 15.0 Object LibraryMicrosoft Excel 15.0 Object Library

The path appears as C:\Program Files\Microsoft Office [xx]\Root\Office[xx]\EXCEL.EXE...

See the files in my path.

FilesFiles

It must be the .EXE or .exe.manifest file. 

 

I know you mentioned 16.0. I would imagine the path is very similar. Just replace the 15's with 16.

 

Hope this helps.

Rafael

0 Likes