Results 1 to 11 of 11

Thread: OCX, Certificates and Warnings

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2007
    Posts
    6

    OCX, Certificates and Warnings

    Hello

    I am developing an add-in for Word using VBA. It uses 2 ActiveX components (as ocx files) that I created using VB6.0.

    I have limited the access to the properties and methods to make the ActiveX components safe, implemented IObjectSafety for each ActiveX component, signed the ocx files as well as the VBA code with a certificate that I have installed on my machine in the Trusted Root Certificate Authority. The certificate was created with makecert.exe.

    I have tried every option that I can think of with regards to certificates and code signing and I am still getting the message “This application is about to initialize ActiveX controls that might be unsafe....” etc.etc. How does Microsoft get around this for their add-ins that use ActiveX components?

    Would this message go away if I was to purchase a proper certificate from a registered Certificate Authority or will I still get this message? I have read many posts regarding ActiveX components and web pages but I havent seen anything that deals woth Word.

    Any help would be greatly appreciated.

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

    Re: OCX, Certificates and Warnings

    Is this just on your system or is the problem on any system?
    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

  3. #3

    Thread Starter
    New Member
    Join Date
    Jul 2007
    Posts
    6

    Re: OCX, Certificates and Warnings

    I haven't checked out the signed code on other systems yet. Does it sound like it's an unusual problem?

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

    Re: OCX, Certificates and Warnings

    Sounds like its not getting signed. The office Cert tool makecert.exe is for signing VBA project code not complied dlls and ocxs. Perhaps this is why
    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

  5. #5

    Thread Starter
    New Member
    Join Date
    Jul 2007
    Posts
    6

    Re: OCX, Certificates and Warnings

    That's an interresting point. It seems to have worked because when I checked the properties of the file, the certificate was attached, however, could it be the wrong type of certificate? Is that possible?

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

    Re: OCX, Certificates and Warnings

    [color=navy]Usually, eveerytime you make a code change and recompile you have to resign the exe too.

    How are you signing it?[/coor]
    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
    New Member
    Join Date
    Jul 2007
    Posts
    6

    Re: OCX, Certificates and Warnings

    I haven't recompiled the code. I'm happy with the component (for now). I'm using signcode.exe to sign the ocx file.

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

    Re: OCX, Certificates and Warnings

    Signcode.exe is the one to use but its a free signing utility.
    See here for its arguments and options:
    http://msdn2.microsoft.com/en-US/lib...cy(VS.80).aspx

    And the one for Makecert.exe:
    http://msdn2.microsoft.com/en-US/lib...y3(VS.80).aspx

    And cert2spc.exe:
    http://msdn2.microsoft.com/en-US/lib...8f(VS.80).aspx
    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

  9. #9

    Thread Starter
    New Member
    Join Date
    Jul 2007
    Posts
    6

    Re: OCX, Certificates and Warnings

    Thanks for those links. I have seen, read and followed the instructions on the pages but I was still getting that message. I think I will start again from scratch - delete all the cert, spc, ctl (etc) files I creatred and see what happens. I'll post the results when they're in.

    In the meantime if their are any more suggestions, I would love to hear them.
    Last edited by Theron; Jul 6th, 2007 at 09:56 AM. Reason: spelling

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

    Re: OCX, Certificates and Warnings

    I think you need to do it one step at a time. Get the first ocx to be accepted safly and then the other. Then sign the vba project etc. How did you make the Word addin?
    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

  11. #11

    Thread Starter
    New Member
    Join Date
    Jul 2007
    Posts
    6

    Re: OCX, Certificates and Warnings

    It's really a VBA project that is installed in the Word startup folder. I will try it one step at a time.

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