Koosh
Koosh

Reputation: 896

having an issue with setting up ImageMagick in my VB6 IDE

I found ImageMagick online and am trying to add it to one of my legacy VB6 projects to convert some .jpgs --> PDFs.

I installed and registered the dll:

ImageMagick-7.0.7-29-Q16-x64-dll.exe

I added the reference in my projects without any issues:

ImageMagicObject 1.0 Type Library

The problem now comes when I try to create an object of ImageMagickObject.MagickImage.1 like so:

 'Dim your object as a simple Object
  Dim imgMkObj As Object

 'Set your object
  Set imgMkObj = CreateObject("ImageMagickObject.MagickImage.1")

 'Convert your image
  MsgBox imgMkObj.Convert("C:\source.jpg", "-resize=800x600", "C:\destination.pdf")

When it gets to the SET part, it gives me an error

Run Time error 429 ActiveX component can't create object

And I really have no idea how to proceed from here. Is there a ImageObject component that I need to have added in my app (OCX) to make this work. I'm trying to programmatically (not command line) to change the formats of some documents.

Can anyone shed some light on this?

Thanks.

Upvotes: 1

Views: 782

Answers (1)

dbmitch
dbmitch

Reputation: 5386

It looks like you've installed the 64 bit version of the DLL.

If they offer a 32 bit install that might solve your problem?

VB6 is a 32 bit application

Upvotes: 4

Related Questions