This content has been marked as final. Show 3 replies
Well, yes, but it is not as easy as you might hope.
First you need to activate the ID Type Library for VBA. That's done in a VBA window (if you don't have one, stop reading :-)). Select Tools -> References, and you get a nice long list of all Type libs on your system. Scroll down until you see "Adobe InDesign CS3 Type Libary", and check the lil' checkbox.
Now you can use any ID scripting method, object, and property as a valid VBA one!
At the start of every script you need to state that the target is ID, that's with the magic invocation
>Dim myInDesign As InDesign.Application
>Set myInDesign = CreateObject("InDesign.Application.CS3")
... and you're off!
Well, at least you can now
if your form also works for ID.
Thanks for that, but I don't understand. The VBA already exits and works for a Word template, I need to make it work for an ID template, in ID, using a language able to be interpreted by ID.
Or did I miss something ?
>Or did I miss something ?
You're missing that Word and ID are two entirely different programs... The only factor they have in common is VBA -- which is "a language able to be interpreted by ID" (that's not actually true, but comes close enough).
The fact that you got working code for Word does not automatically mean it can be easily adjusted to work in ID. As I stated
>>Well, yes, but it is not as easy as you might hope.
Your script probably consists of two parts: an input dialog, where the user inputs his stuff and presses an Okay button, and a processing part, where the data collected is written into a proper Word document. The former works totally independent of Word -- the dialog is purely a part of VBA. So it will do the same "in" InDesign. The latter interfaces with Word, even if it's only as 'simple' as writing a string of text. That part of the code need ID methods.
Perhaps you should start with a less challenging project as your first.