Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add a reference to Photoshop CS4 COM in C#

I'm having a little problem with Photoshop CS4 automation. When I want to add a reference to the COM API in my Visual Studio 2008 project, the Adobe Photoshop Object Library doesn't show up in the "Add References" panel under the "COM" tab. However, the Illustrator CS4 Type library show up just fine. Photoshop itself run perfectly, both in the 32 and 64 bit flavor. Photoshop was installed along with every other app of the Master Suite CS4.

This didn't work on both Windows 7 and Windows XP, on 2 different machine + 1 virtual PC (Vmware workstation). I also tried it in the VS2010 Beta 1 and the MS Word VB editor, but it didn't work here either.

Anybody has any thought? If you were able to add a reference, what was your configuration?

like image 613
Laurent Bourgault-Roy Avatar asked Jan 24 '23 09:01

Laurent Bourgault-Roy


1 Answers

There is no need to create a Virtual Machine, there is a problem with some versions of Photoshop in as much the COM does not show, to correct this run Photoshop as Administrator (just the once) and this will correct the registry entries and the COM will then be available.

like image 134
Paul Avatar answered Feb 01 '23 08:02

Paul