Imagemagick ActiveX error 429
Posted on 2012-08-17
Here is my VBA code:
Dim MGImg As New MagickImage
Dim Source As String
Dim Dest As String
Source = "C:\3.Store\test1.jpg"
Dest = "C:\3.Store\vbout.jpg"
MGImg.Convert Source, "-crop", "500x500+10+10", Dest 'Error occurs here
I get a "Run-time error'429': ActiveX component can't create object"
The DLL for Imagemagick is registered as checking the Registry, I find "ImageMagickObject.dll" in two places, both with the same data value of "C:\Program Files\ImageMagick-6.7.9-Q8\ImageMagickObject.dll"
I can also confirm the dll file is in the proper location
When I try to un-register or re-register via
c:\ regsvr32 ImageMagickObject.dll
I get the error: "LoadLibrary("ImageMagickObject.dll") failed - The specified module could not be found."
If I perform the regsvr32 command inside the ImageMagic folder, or reference the path directly, I get the same error.
ImageMagic does work fine from the cmd line or from a batch file, I just can't call it directly from VBA.
What else could I check to fix the dll link for my project? Could something else be triggering the error?
I also read a comment about how one aspect of the COM object being corrupt could corrupt the entire dll. I've tried the 8bit static and the 16 bit dll from ImageMagick, same issue.