Results 1 to 5 of 5
  1. #1
    jimdoria
    Guest

    VBA & PhotoDraw (crazy?) (2003/2000)

    Quite possibly a loopy request, but I'll ask anyway. Has anyone ever used VBA to control PhotoDraw?

    Seems like it should be possible. PhotoDraw shows up with a full set of VBA objects in the Word object browser. The problem is I can't instantiate the PhotoDraw application object, hence I can't do anything else. The PhotoDraw library appears in the object browser as "Phd2ExeLib". But none of the following work:

    <pre>Dim pdApp As Object

    Set pdApp = CreateObject("Phd2ExeLib.Application")
    Set pdApp = CreateObject("Phd2.Application")
    Set pdApp = CreateObject("Photodraw.Application")
    Set pdApp = CreateObject("Photodraw2.Application")
    Set pdApp = CreateObject("Photodrw.Application") <font color=448800>'(using the filename of the EXE.)</font color=448800>
    Set pdApp = CreateObject("Photodrw2.Application")
    </pre>

    They all fail with run-time error 429 - ActiveX component can't create object. This happens whether PhotoDraw is running or not
    Any ideas? I thought if anyone would know it would be you folks. <img src=/S/crazy.gif border=0 alt=crazy width=15 height=15>

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: VBA & PhotoDraw (crazy?) (2003/2000)

    It seems to be "DecoAppLib.Application", but see this newsgroup thread for a warning.

  3. #3
    jimdoria
    Guest

    Re: VBA & PhotoDraw (crazy?) (2003/2000)

    Wow, that was quick! Thanks, Hans -

    Unfortunately, this doesn't work either, returning the same error 429 as the others. "DecoAppLib2" fails also.

    Incidentally, may I ask how you got this answer? I remember seeing an article a while ago about how to determine this information for a given COM object, but I lost track of it.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: VBA & PhotoDraw (crazy?) (2003/2000)

    I searched in Google and in the newsgroups for photodraw automation vba. I'm afraid I don't have a solution for you.

  5. #5
    jimdoria
    Guest

    Re: VBA & PhotoDraw (crazy?) (2003/2000)

    Unfortunately, I think I have my answer.

    I fired up VB5 (rather than VBA) on a different machine that also has PhotoDraw2 installed and created a simple app instantiating the object using Phd2ExeLib as the name.
    <pre>Dim pd As Phd2ExeLib.Application
    Set pd = CreateObject(Phd2ExeLib.Application)
    pd.Visible = True
    </pre>


    Instead of a 429 error, line #2 of the VB5 program gave me a 430 error - "Class doesn't support automation"

    Seems like rather than letting people poke around, MS disabled the automation interface in V2. <img src=/S/boxedin.gif border=0 alt=boxedin width=25 height=20>

    Not sure why VBA reports the wrong error, though.

Posting Permissions

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