Update: I am, in fact, a bonehead. Problem solved:
VB Code:
Public Sub OpenPhotoFile_Click() Dim PhotoDoc As IAutoPSDoc 'Opens Photoshop Set photoshop = New PhotoshopApplication 'Opens the template 'Opens the first file Set PhotoDoc = photoshop.Open("C:\whatever\testme.psd")
------------------------------
Hiya folks. I hope you can help me out.
I've started working on a project that requires extensive automation of Photoshop. My company isn't a member of Adobe's little club and so I don't have access to the SDK, and so if this is a completely boneheaded question I apologize in advance.
I run into an issue right off the bat:
VB Code:
Public Sub OpenPhotoFile_Click() Set photoshop = New PhotoshopApplication PhotoshopApplication.Open ("c:\whatever\testme.psd") End Sub
Also, I havein my declarations.VB Code:
Public photoshop As PhotoshopApplication
The problem is that when I run this, while Photoshop starts up and testme.psd does open up, the file closes immediately afterwards -- almost instantaneously. I'm confused, as I certainly haven't told Photoshop to close testme.psd and (obviously) I really need that file to stay open. Can anyone tell me why this is happening, and more importantly how I can stop it?


Reply With Quote