Results 1 to 31 of 31

Thread: Interop vs. Core [Not Resolved]

  1. #1

    Thread Starter
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Arrow Interop vs. Core [Not Resolved]

    What is the difference between ...
    VB Code:
    1. Option Explicit On
    2. Option Strict On
    3.  
    4. Imports Microsoft.Office.Interop
    5.  
    6. Public Class Blah
    7. '...
    8.  
    9. 'And
    10.  
    11. Option Explicit On
    12. Option Strict On
    13.  
    14. Imports Microsoft.Office.Core
    15.  
    16. Public Class Blah
    17. '...
    I have two systems both running the same version of VS 2003 w/VSTO 2003 on XP. Only difference is one
    is XP SP1 and the other is XP SP2. Now if on the system without the .Interop namespace some Office code will give
    errors. I have to end up only importing just the Microsoft.Office namespace only.

    Here is the code in question.

    And on the working system -


    The XP SP1 system only shows the Core namespace.



    Is there any reason that I should not import the entire Office namespace?

    Thanks for any insight into this.
    Last edited by RobDog888; Apr 27th, 2005 at 12:24 AM.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: Interop vs. Core

    Quote Originally Posted by RobDog888
    The XP SP1 system only shows the Core namespace.
    [/color]
    THat's odd..... that's actualy backwards from what I would expect....

    I was going to suggest that maybe the .Interop class is what would allow you to interact with the older Office products, while .Core would be .NET built in to the newer office. I would have expected that .Interop to be in the SP1 as it would allow older code to work..... ??? Unless it got left out and wasn't available until SP2?

    Got me. Its just a guess really.

    Tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3

    Thread Starter
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Interop vs. Core

    I'm still searching the helpfile and msdn online and I read one thing so far... .Interop (for Office only) is the vendors
    official release... blah, blah, blah.

    So, maybe its the SP2 that contains the RTM patches for Office but that doesnt make any sense unless its
    there and SP2 gives access to it or something like that?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  4. #4
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,106

    Re: Interop vs. Core

    I had something like this for Excel, and I don't fully understand it.

    I was doing something that needed the Excel interop. I had it on one system, but not on any other system. Nothing I did in VS seemed to change this in any way. Eventually, I went back to Add/Remove programs in control panel, and selected Office. Under the add features option, I was able to look at individual install components. The key was the .NET programmability libraries (or something like that).

    Without these installed, nothing in VS allowed me to use interop (it errored out any reference to it). With these installed, interop was there, and everything worked fine.

    I have done no further research on the topic.
    My usual boring signature: Nothing

  5. #5
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Interop vs. Core

    Quote Originally Posted by Shaggy Hiker
    I had something like this for Excel, and I don't fully understand it.

    I was doing something that needed the Excel interop. I had it on one system, but not on any other system. Nothing I did in VS seemed to change this in any way. Eventually, I went back to Add/Remove programs in control panel, and selected Office. Under the add features option, I was able to look at individual install components. The key was the .NET programmability libraries (or something like that).

    Without these installed, nothing in VS allowed me to use interop (it errored out any reference to it). With these installed, interop was there, and everything worked fine.

    I have done no further research on the topic.
    http://msdn.microsoft.com/library/de...embliesFAQ.asp

  6. #6

    Thread Starter
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Interop vs. Core

    Thanks Shaggy. I will check it out when I get home.

    Guess thats good enough until verification tonight.

    Just had a quick look on this system and it appears the the .NET Programmability is under each of
    the Office Suite programs you have installed. Plus one under Office Tools for MS Forms 2.0 Programmability.

    I know I have a full install at home, but I wil check it out.





    Attached Images Attached Images   
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  7. #7

    Thread Starter
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Interop vs. Core

    Doh! Missed your post kleinma. Great link. I bet my other system may have a corrupt interop! I am almost 100% sure
    I installed the .NET Programmability Support.

    I cant wait to go home for 2 reasons now
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  8. #8
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Interop vs. Core

    Quote Originally Posted by RobDog888

    I cant wait to go home for 2 reasons now
    can't "work sucks" be a 3rd????

  9. #9

    Thread Starter
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Interop vs. Core

    Quote Originally Posted by kleinma
    can't "work sucks" be a 3rd????
    Thats my First reason!
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  10. #10
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,106

    Re: Interop vs. Core

    Interesting link, it confirms what I had determined through trial and error. I was thinking that it was pretty awkward requiring the end user to have a certain installation of Excel (with certain components installed) before they were able to use the interop, but maybe that is understandable. Unlike Access, Excel files are tied to the program pretty tightly. By giving away the interop, you are pretty much giving away the program. M$ doesn't like to do that, but in this case I think it is understandable.
    My usual boring signature: Nothing

  11. #11

    Thread Starter
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Interop vs. Core [Resolution Pending]

    But if they cant install the PIAs without having Office installed, the only give away is the end user of the
    vs program. I dont think that they are giving away too much since it would really take allot of code to do anything
    that would be at the level of a replacement.

    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  12. #12
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,106

    Re: Interop vs. Core [Resolution Pending]

    Actually, one of the things you can do is run the app. It is up to you whether or not it is actually visible to the user. If it is visible, then it is just the same as starting it as normal. In this way, they are giving the whole program away (or, I suppose, the interop must launch the program).

    When I was testing some of this, I kept breaking the debugger and restarting. I had a class to encapsulate the Excel work entirely, and the Dispose() method closed it. Whenever I had a problem in debugging, I restarted the app. After a little while, I looked at the system monitor, and realized I had half a dozen hidden Excel instances in memory. Had to go through and terminate them all manually.
    My usual boring signature: Nothing

  13. #13

    Thread Starter
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Interop vs. Core [Resolution Pending]

    Ok, I installed the .NET Programm blah ... but no .Interop yet.

    It says to run the RegAsm from the global assembly cache

    From the global assembly cache, run the RegAsm tool on the affected PIA to re-register it. For example, run RegAsm on the Office PIA (the Office PIA namespace is Microsoft.Office.Core), as follows:
    %systemroot%\Microsoft.NET\Framework\v1.1.4322\RegAsm.exe
    %systemroot%\assembly\GAC\Office\11.0.0.0__71e9bce111e9429c\Office.dll
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  14. #14

    Thread Starter
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Interop vs. Core [Resolution Pending]

    I updated my office and ran the regasm from the command line.
    Now I get the .Interop but when I add both references (Ofice and Outlook) the Outlook objects are not found.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  15. #15

    Thread Starter
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Interop vs. Core [Resolution Pending]

    *BUMP* = Outlook still not found.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  16. #16
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Interop vs. Core [Not Resolved]

    rob, unless I am doing something wrong (or not what you are looking for) I was able to set a reference to "Microsoft Outlook 11.0 Object Library" under the com tab, and then I was able to access the outlook classes.

    the reference file it says it points to in the com tab is msoutl.tlb, but when you add the reference, it points to the dll in the GAC for outlooks PIA

    and it imports as
    Imports Microsoft.Office.Interop.Outlook

  17. #17
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,106

    Re: Interop vs. Core [Not Resolved]

    I haven't worked with Outlook, but I see the same things Kleinma sees. From your description, it really sounds like the programmability (from post #6) is not installed for Outlook. Is there a way to confirm it? Your description sounds like the problem I had before I got Excel set up right.
    My usual boring signature: Nothing

  18. #18
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Interop vs. Core [Not Resolved]

    I also did not have to install anything to the GAC, it did it for me when I put my office CD in and did the advanced install and selected to install the PIAs

    i noticed you said you had to do it manually rob?

  19. #19

    Thread Starter
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Interop vs. Core [Not Resolved]

    Yes, I installed the PIAs from the Office CD and then I still had to run the RegAsm like in the article. That got the
    Interop to show, but even with the reference to Outlook added it still shows "undefined" for my Outlook objects.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  20. #20

    Thread Starter
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Interop vs. Core [Not Resolved]

    I was just re-reading some of the posts to make sure I didnt miss something and I did but it doesnt make sense.
    "Imports Microsoft.Office.Interop.Outlook" make it work but at the office my system is using the "Imports Microsoft.Office.Interop"
    only and that works?

    Why is it different and why doesnt it recognise from just the Interop import the Outlook namespace?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  21. #21
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Interop vs. Core [Not Resolved]

    Quote Originally Posted by RobDog888
    I was just re-reading some of the posts to make sure I didnt miss something and I did but it doesnt make sense.
    "Imports Microsoft.Office.Interop.Outlook" make it work but at the office my system is using the "Imports Microsoft.Office.Interop"
    only and that works?

    Why is it different and why doesnt it recognise from just the Interop import the Outlook namespace?
    well there are 2 different COM references, one is the Office 11.0 object library and one is the outlook 11.0 one.....

    I think if you reference the first one, it gives you what you say you have at work... while the second give you what I had posted..

  22. #22

    Thread Starter
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Interop vs. Core [Not Resolved]

    Well now I'm even more confused. I added a reference to MS Excel and with the Imports ...Interop only I can
    do Dim oWB As Excel.Workbook without errors. I should be able to do the same for Outlook but it doesnt have the PIAs I guess.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  23. #23
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Interop vs. Core [Not Resolved]

    Quote Originally Posted by RobDog888
    Well now I'm even more confused. I added a reference to MS Excel and with the Imports ...Interop only I can
    do Dim oWB As Excel.Workbook without errors. I should be able to do the same for Outlook but it doesnt have the PIAs I guess.
    do you see the outlook PIA in the GAC?

  24. #24

    Thread Starter
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Interop vs. Core [Not Resolved]

    But if you add just the Outlook reference then it adds both the Outlook and Office references.

    I'll look in the GAC.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  25. #25
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Interop vs. Core [Not Resolved]

    Quote Originally Posted by RobDog888
    But if you add just the Outlook reference then it adds both the Outlook and Office references.

    I'll look in the GAC.
    its weird... if i remove the office reference but leave the outlook one, it still works.. did this to test

    VB Code:
    1. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    2.         Dim OL As New Microsoft.Office.Interop.Outlook.ApplicationClass
    3.         MsgBox(OL.Version)
    4.         OL = Nothing
    5.     End Sub

    im not sure if you lose any other functionality though...

  26. #26

    Thread Starter
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Interop vs. Core [Not Resolved]

    I dont see the PIAs I re-ran the Office setup and double checked if the .NET Programmability were installed
    for all products and they were. Should I install the PIA Redistributables download too?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  27. #27
    I'm about to be a PowerPoster! kleinma's Avatar
    Join Date
    Nov 2001
    Location
    NJ - USA (Near NYC)
    Posts
    23,373

    Re: Interop vs. Core [Not Resolved]

    Quote Originally Posted by RobDog888
    I dont see the PIAs I re-ran the Office setup and double checked if the .NET Programmability were installed
    for all products and they were. Should I install the PIA Redistributables download too?
    hmmm maybe.. or can you select an uninstall of the PIAs in the office setup, and then try to install them again?

  28. #28

    Thread Starter
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Interop vs. Core [Not Resolved]

    Ok, I removed the Outlook PIA and re-opened my Outlook project. Removed the reference and re-added it.
    It works now but then that means I dont have PIAs for Outlook. It worked the other way (with PIA) but I'll have to
    connect to work and compare the GAC? (I'm playing hooky from work today )
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  29. #29
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,106

    Re: Interop vs. Core [Not Resolved]

    I don't know what that office one does. I remember that I added it, removed it, added it again, etc. Never did see any changes.
    My usual boring signature: Nothing

  30. #30

    Thread Starter
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: Interop vs. Core [Not Resolved]

    The Office reference is the core of the Office program. Like commandbars, toolbars, buttons, and menu items.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  31. #31
    Super Moderator Shaggy Hiker's Avatar
    Join Date
    Aug 2002
    Location
    Idaho
    Posts
    40,106

    Re: Interop vs. Core [Not Resolved]

    That explains it, I never used any of that stuff.
    My usual boring signature: Nothing

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width