Need help to run script in Photoshop or Illustrator from vba Excel

Roli001

Board Regular
Joined
Jul 29, 2004
Messages
130
I'm trying to build a database in Access/Excel that would help me categorize all my downloaded vector art. The files that I have are generically named and I would like to rename them using hierarchy i.e. a stove would be 012345000 where 01 stands for household, 02-kitchen, 03-appliance 000 - next consecutive number.

To do so I need to open each picture to view it and decide into which category it falls, input it into the database with additional information and then save the picture under the new name.

Excel and Access don't support vector illustrations so I need to open them in another application i.e. Adobe Photoshop or Adobe Illustrator. Both of these applications support scripts so I could use those to open, rename and close the picture while controlling all the actions from my database.

I should be able to build the Access/Excel part fairly easily. I'm looking for a piece of code that would allow VBA to start a script in Adobe products.

Appreciate any help.

Thanks,
Roli
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
I figured it out...actually quite simple.

The below code uses an existing instance of illustrator to upen a document and then close it once I'm done viewing it.

I will rename it using vba in Excel after the hierarchy has been added to the illustration

Code:
Sub openillustrator()

Set appref = CreateObject("Illustrator.Application")
Set docref = appref.Open("C:\Users\MyName\Desktop\Test.eps")

'.....me viewing and hierarchy set here...

docref.Close

Set appref = Nothing
Set docref = Nothing

'...additional code in VBA to rename file based on hierarchy and loop to next file.

End Sub

Thanks.
 
Upvote 0

Forum statistics

Threads
1,224,570
Messages
6,179,610
Members
452,931
Latest member
The Monk

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top