How To Register Mscomct2 Ocx In Windows 7 32 Bit
* Please try a lower page number.
* Please enter simply numbers.
* Please try a lower page number.
* Delight enter only numbers.
That is not possible. It must be registered it equally administrator (and be in the correct folder).
The procedure is covered at http://www.gmayor.com/popup_calendar.htm
Graham Mayor (Microsoft Give-and-take MVP 2002-2019)
For more than Word tips and downloads visit my web site
https://www.gmayor.com/Word_pages.htm
Was this reply helpful?
Sorry this didn't help.
Great! Thank you for your feedback.
How satisfied are you with this respond?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
Thank you for your reply!!!
Just the sales executives deceit exist given administrative rights.its against company policy.Is there a way to fix this issue?
regards,
rajan
Was this reply helpful?
Sorry this didn't assistance.
Great! Thanks for your feedback.
How satisfied are you lot with this respond?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this answer?
Cheers for your feedback.
This is non entirely correct . It is possible to register an OCX with the WIndows API. I accept tried this with the agenda control (MSCAL.ZIP) from your side and this macro Sub RegisterCalendar() Sub UnRegisterCalendar() Copy the code below into a normal module and name it "modDLL". @Rajan_D: I was likewise able to annals the MSCOMCT2.OCX Download the mscomct2.cab from Andreas. 'Version 1.two Pick Explicit Private Declare Part LoadLibrary Lib "kernel32" Allonym "LoadLibraryA" _ Function RegisterLibrary(Filename As String, Register Every bit Boolean) As Boolean If Trim$(Filename) = "" Then Get out Part On Error GoTo ExitPoint If Register = True And so On Error Resume Next
http://www.gmayor.com/downloads.htm
'Register the Agile-X command
If Not RegisterLibrary(ThisWorkbook.Path & "\MSCAL.OCX", True) Then
MsgBox "DllRegisterServer failed"
Exit Sub
Stop If
'Errors off, we may not have the access to the VBA project
On Error Resume Next
'Set up the VBA reference
Application.VBE.ActiveVBProject.References.AddFromFile _
ThisWorkbook.Path & "\MSCAL.OCX"
End Sub
'Unregister the Active-X command
RegisterLibrary ThisWorkbook.Path & "\MSCAL.OCX", Simulated
'Errors off, nosotros may not have the access to the VBA projection
On Error Resume Next
'Remove the VBA reference
Application.VBE.ActiveVBProject.References.Remove _
Application.VBE.ActiveVBProject.References("MSACAL")
Finish Sub
http://support.microsoft.com/kb/297381/de
and excerpt the mscomct2.ocx manually!
'Andreas Killer
'21.12.2011
Option Private Module
(ByVal lpLibFileName Equally String) As Long
Private Declare Function GetProcAddress Lib "kernel32" _
(ByVal hModule As Long, ByVal lpProcName As Cord) As Long
Private Declare Function FreeLibrary Lib "kernel32" _
(ByVal hLibModule Every bit Long) Every bit Long
Private Declare Function CallWindowProc Lib "user32" Allonym "CallWindowProcA" _
(ByVal wndrpcPrev As Long, ByVal hWnd As Long, _
ByVal uMsg As Long, ByVal wParam As Long, lParam As Any) As Long
'Annals an external DLL
Dim hLib As Long, hProcAddress As Long
Debug.Print Filename
hLib = LoadLibrary(Filename)
If hLib = 0 And so Exit Role
hProcAddress = GetProcAddress(hLib, "DllRegisterServer")
Else
hProcAddress = GetProcAddress(hLib, "DllUnregisterServer")
End If
If hProcAddress = 0 Then GoTo ExitPoint
Call CallWindowProc(hProcAddress, 0, 0, 0, 0)
RegisterLibrary = True
ExitPoint:
FreeLibrary hLib
Terminate Role
one person establish this respond helpful
·
Was this reply helpful?
Distressing this didn't help.
Nifty! Thank you for your feedback.
How satisfied are you with this reply?
Cheers for your feedback, it helps us ameliorate the site.
How satisfied are you lot with this reply?
Cheers for your feedback.
Good catch - and information technology seems to work with the anticipated folder location for Windows 7 64 scrap (though the code would not work without modification in 64 bit versions of Office - and of course this item command would not work in that version anyway).
I have modified it for utilise in Give-and-take also and inverse the binder location to that where Windows expects information technology to be, and if you have no objections I volition add it to my vba page with attribution.
Option Explicit
Choice Private Module
'Version 1.two
'Andreas Killer
'21.12.2011
Individual Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" _
(ByVal lpLibFileName As String) As Long
Private Declare Function GetProcAddress Lib "kernel32" _
(ByVal hModule Every bit Long, ByVal lpProcName Every bit String) As Long
Individual Declare Function FreeLibrary Lib "kernel32" _
(ByVal hLibModule Every bit Long) As Long
Private Declare Role CallWindowProc Lib "user32" Alias "CallWindowProcA" _
(ByVal wndrpcPrev As Long, ByVal hWnd Equally Long, _
ByVal uMsg As Long, ByVal wParam As Long, lParam As Any) Every bit Long
Private Const strPath Every bit String = "C:\Windows\SysWOW64"
Sub RegisterCalendar()
'Register the Active-X command
If Not RegisterLibrary(strPath & "\MSCAL.OCX", Truthful) Then
MsgBox "DllRegisterServer failed"
Exit Sub
End If
'Errors off, we may not have the admission to the VBA project
On Mistake Resume Adjacent
'Gear up the VBA reference
Application.VBE.ActiveVBProject.References.AddFromFile _
strPath & "\MSCAL.OCX"
Cease Sub
Sub UnRegisterCalendar()
'Unregister the Agile-10 control
RegisterLibrary strPath & "\MSCAL.OCX", False
'Errors off, nosotros may not have the access to the VBA project
On Error Resume Next
'Remove the VBA reference
Application.VBE.ActiveVBProject.References.Remove _
Application.VBE.ActiveVBProject.References("MSACAL")
End Sub
Function RegisterLibrary(Filename Every bit String, Annals Equally Boolean) Equally Boolean
'Register an external DLL
Dim hLib Equally Long, hProcAddress Equally Long
If Trim$(Filename) = "" Then Exit Office
On Fault GoTo ExitPoint
Debug.Impress Filename
hLib = LoadLibrary(Filename)
If hLib = 0 Then Get out Function
If Register = Truthful Then
hProcAddress = GetProcAddress(hLib, "DllRegisterServer")
Else
hProcAddress = GetProcAddress(hLib, "DllUnregisterServer")
Terminate If
If hProcAddress = 0 Then GoTo ExitPoint
On Error Resume Next
Call CallWindowProc(hProcAddress, 0, 0, 0, 0)
RegisterLibrary = True
ExitPoint:
FreeLibrary hLib
Finish Part
Graham Mayor (Microsoft Give-and-take MVP 2002-2019)
For more Word tips and downloads visit my spider web site
https://world wide web.gmayor.com/Word_pages.htm
Was this reply helpful?
Sorry this didn't help.
Slap-up! Cheers for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, information technology helps usa improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
I've have Win7 64-scrap and Office 32-bit and I'g certain that at that place is no need to copy the OCX into the SysWOW64 folder. Please go out a note in the documentation of this behavior.
If y'all accept Win7 64-chip and Office 64-flake, delight modify the lawmaking a follows. Did it work?
(Note: The Win64 conditional define is not related to the running Os, it's gear up on Function 64-chip.)
Andreas.
#If Win64 Then
Private Declare PtrSafe Part LoadLibrary Lib "kernel32" Allonym "LoadLibraryA" ( _
ByVal lpLibFileName As Cord) Every bit LongPtr
Private Declare PtrSafe Function GetProcAddress Lib "kernel32" ( _
ByVal hModule As LongPtr, ByVal lpProcName As String) Every bit LongPtr
Individual Declare PtrSafe Function FreeLibrary Lib "kernel32" ( _
ByVal hLibModule As LongPtr) As Long
Individual Declare PtrSafe Part CallWindowProc Lib "user32" Alias "CallWindowProcA" ( _
ByVal lpPrevWndFunc As LongPtr, ByVal hWnd Equally LongPtr, ByVal Msg As Long, _
ByVal wParam As LongPtr, ByVal lParam As LongPtr) Every bit LongPtr
#Else
Individual Declare Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" ( _
ByVal lpLibFileName As String) Equally Long
Private Declare Function GetProcAddress Lib "kernel32" ( _
ByVal hModule As Long, ByVal lpProcName As String) As Long
Individual Declare Role FreeLibrary Lib "kernel32" (ByVal hLibModule Equally Long) As Long
Private Declare Function CallWindowProc Lib "user32" Alias "CallWindowProcA" ( _
ByVal wndrpcPrev As Long, ByVal hWnd As Long, ByVal uMsg Equally Long, ByVal wParam As Long, _
lParam As Any) As Long
#End If
Function RegisterLibrary(Filename As String, Register As Boolean) As Boolean
'Register an external DLL
#If Win64 And then
Dim hLib As LongPtr, hProcAddress As LongPtr
#Else
Dim hLib As Long, hProcAddress As Long
#Stop If
Was this reply helpful?
Sorry this didn't help.
Great! Thanks for your feedback.
How satisfied are yous with this reply?
Cheers for your feedback, it helps usa improve the site.
How satisfied are y'all with this answer?
Thank you for your feedback.
mscal.ocx is non compatible with office 64 bit, though your modification should work for 64 bit object library files. My annotate related to the full general principle of this approach rather than the particular example.
Some of the dll files that are non registered with Windows 7 64 chip are already nowadays in the default binder, just non registered in Windows, which is why I suggested using it.
In the interest of experimentation, I unregistered and removed the MSCAL.OCX from the SysWOW64 binder and put information technology in the Microsoft Office folder. Your macro registered it (plain with the path changed to reflect its new location) and showed it in the Tools > References listing, but confronting that entry it still showed the path every bit the SysWOW64 folder. Restarting Discussion acquired fault letters to be produced by a couple of add together-ins that attempted to call upon it (as information technology was no longer nowadays) but it was still shown every bit checked in the normal template (and still pointing to the SysWow64 folder. At that signal I began to lose the will to alive :)
I also tried to annals it from a different location on another drive (actually the Discussion startup folder) and it would not accept that location and so clearly there are limitations from where it can be legitimately accessed.
Frankly I was a tad confused by what is going on here so I am tempted to stick with my proposition of ensuring that it is in the folder where Windows expects it to be.
Graham Mayor (Microsoft Word MVP 2002-2019)
For more than Word tips and downloads visit my web site
https://www.gmayor.com/Word_pages.htm
Was this respond helpful?
Sad this didn't help.
Great! Thank you for your feedback.
How satisfied are you lot with this reply?
Thanks for your feedback, it helps us improve the site.
How satisfied are you with this respond?
Thanks for your feedback.
Frankly I was a tad confused by what is going on here so I am tempted to stick with my suggestion of ensuring that information technology is in the folder where Windows expects it to be.
I 'chiliad not 100% sure how the organisation performs the Registering , only definitely the OCX must not be placed in the SysWow64 folder . I have placed the OCX in a network folder and it works. If you like, endeavor as follows: - Unregister the OCX
- Delete the OCX file
- Start Discussion (without whatsoever AddIn that uses that control)
- Make a new file
- Remove the Icon from the Toolbox window
- Close Word
- Copy the OCX into any binder, except SysWow64 ;-)
- Open up Word ( without any AddIn that uses that control )
- Make a new file
- Run sub RegisterCalendar
- Insert a userform
- Add together the Icon for the calendar control the Toolbox
- Create a control on the form and run the from, it should work.
Later on that all your AddIn's should apply the new OCX.
Once you have registered the OCX to the organization, it seems that it'south not possible to change the path to a dissimilar location. I 've seen it when I tried to annals INKED.DLL (for my FormelEditor AddIn), this DLL exists on my Win7 and my code runs merely in fact the DllRegisterServer routine inside the DLL fails.
BTW, I test these things always in a Virtual PC, not with my real Os.
Andreas.
Was this reply helpful?
Deplorable this didn't assist.
Great! Thanks for your feedback.
How satisfied are yous with this reply?
Thanks for your feedback, it helps u.s.a. amend the site.
How satisfied are you with this reply?
Thanks for your feedback.
OK I take checked further and broadly concur with what you have said. the merely additional comment I would make is that if y'all have any reference to the OCX file in the normal template, flagged equally 'MISSING' then that reference must be unchecked or the macro fails.
While this works for the normal template for the current session, if you lot then add back the add-ins with the references, the missing reference fault returns - even for the normal template and the references are still pointing to SysWOW62. Information technology seems that the process does not annals the OCX file in Windows after all and so when you restart Word the changes yous make with the macro are lost.
I used regsvr32 to unregister the OCX before removing information technology from SysWOW64.
This was tested on a live system and not in a virtual system.
Graham Mayor (Microsoft Give-and-take MVP 2002-2019)
For more Give-and-take tips and downloads visit my web site
https://www.gmayor.com/Word_pages.htm
Was this reply helpful?
Deplorable this didn't assistance.
Great! Cheers for your feedback.
How satisfied are you lot with this reply?
Thanks for your feedback, information technology helps us amend the site.
How satisfied are you with this reply?
Thanks for your feedback.
What about an instance with an other file? Can yous discover the OWC11.DLL (ChartSpace control) on your system?
If not, endeavor this:
- Download the OWC11.EXE from
http://www.microsoft.com/en-u.s.a./download/details.aspx?id=22276
DO Non EXECUTE THAT FILE!!
- Open that file with a Naught tool (I use 7-zero for this)
- Extract the OWC11.msi
DO Non EXECUTE THAT FILE!!
- Open the OWC11.msi with a Nix tool
- Excerpt the OWC11.DLL
- Open up Word
- Make a new file
- Insert a Userform
- Add together the code below
- Relieve the file in the same directory as the OWC11.DLL
- Run the Userform
Andreas.
Option Explicit
Dim C As Control
Individual Sub UserForm_Activate()
If C Is Cipher Then Unload Me
End Sub
Private Sub UserForm_Initialize()
'Annals the Agile-X control
If Non RegisterLibrary(ThisDocument.Path & "\OWC11.DLL", Truthful) Then
MsgBox "DllRegisterServer failed"
Go out Sub
Finish If
'Add the command to our course
Prepare C = Me.Controls.Add("OWC11.Chartspace")
C.Charts.Add
'Resize the class to fit the control
Me.Width = C.Width + Me.Width - Me.InsideWidth
Me.Height = C.Meridian + Me.Height - Me.InsideHeight
End Sub
Private Sub UserForm_Terminate()
RegisterLibrary ThisDocument.Path & "\OWC11.DLL", Fake
End Sub
Was this answer helpful?
Lamentable this didn't help.
Cracking! Thank you for your feedback.
How satisfied are you with this reply?
Thanks for your feedback, it helps usa improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
The file exists at C:\Program Files (x86)\Mutual Files\microsoft shared\Web Components\eleven, so is probably already registered and so I am not certain where we are going with this instance?
Graham Mayor (Microsoft Word MVP 2002-2019)
For more than Word tips and downloads visit my web site
https://world wide web.gmayor.com/Word_pages.htm
Was this reply helpful?
Sorry this didn't help.
Great! Thanks for your feedback.
How satisfied are you with this respond?
Cheers for your feedback, it helps u.s. improve the site.
How satisfied are you with this reply?
Thanks for your feedback.
* Please effort a lower page number.
* Please enter only numbers.
* Please try a lower page number.
* Please enter but numbers.
Source: https://answers.microsoft.com/en-us/msoffice/forum/all/how-to-register-mscomctlocx-in-windows-7-without/8a6d2793-a03a-4f00-b476-4521e39b2e64
Posted by: ellismandred48.blogspot.com
0 Response to "How To Register Mscomct2 Ocx In Windows 7 32 Bit"
Post a Comment