Thread View: adobe.scripting.indesign
7 messages
7 total messages
Started by jacintha_mary
Sat, 21 Mar 2009 04:09
Insert Text Variable
Author: jacintha_mary
Date: Sat, 21 Mar 2009 04:09
Date: Sat, 21 Mar 2009 04:09
9 lines
836 bytes
836 bytes
How to Insert text variable in Indesign document using Visual Basic. I have tried the below code. xmlelement.InsertionPoints.LastItem.TextVariableInstances.Add (TextVariable) What should i pass for 'Add' keyword to insert text variable? Thanks Jacintha
Re: Insert Text Variable
Author: Harbs
Date: Mon, 23 Mar 2009 12:27
Date: Mon, 23 Mar 2009 12:27
5 lines
756 bytes
756 bytes
A text variable... (or am I missing the question) -- Harbs http://www.in-tools.com
Re: Insert Text Variable
Author: jacintha_mary
Date: Tue, 24 Mar 2009 09:21
Date: Tue, 24 Mar 2009 09:21
7 lines
903 bytes
903 bytes
Hi, xmlelement.InsertionPoints.LastItem.TextVariableInstances.Add (TextVariable) 'Textvariable' which is given inside the 'ADD' is the Text Variable created in the Indesign documents. eg.'Chapter Number' is created as a Text variable. And now i want to insert this 'Chapter Number' Text variable in my document. -Jacintha
Re: Insert Text Variable
Author: Harbs
Date: Tue, 24 Mar 2009 22:17
Date: Tue, 24 Mar 2009 22:17
7 lines
848 bytes
848 bytes
variable = doc.textVariables.item("Chapter Number");
xmlelement.insertionPoints.lastItem.textVariableInstances.add (variable);
--
Harbs
http://www.in-tools.com
Re: Insert Text Variable
Author: jacintha_mary
Date: Wed, 25 Mar 2009 06:37
Date: Wed, 25 Mar 2009 06:37
8 lines
780 bytes
780 bytes
Hi Harbs, Thanks for you help. But still i'm getting error as "Invalid value for parameter 'To' of event 'ADD'. Excepted idLocationOptions enumerator, but received "Chapter Number". Thanks, Jacintha
Re: Insert Text Variable
Author: Harbs
Date: Wed, 25 Mar 2009 13:47
Date: Wed, 25 Mar 2009 13:47
16 lines
1057 bytes
1057 bytes
Sorry about that.
This should work...
chapNumVariable = doc.textVariables.item("Chapter Number");
textVariable =
xmlelement.insertionPoints.lastItem.textVariableInstances.add ();
textVariable.associatedTextVariable = chapNumVariable;
You can also create the associated text variable as a property when you
create it...
--
Harbs
http://www.in-tools.com
Re: Insert Text Variable
Author: jacintha_mary
Date: Thu, 26 Mar 2009 11:52
Date: Thu, 26 Mar 2009 11:52
11 lines
868 bytes
868 bytes
Thanks much. Its working now.
set chapNumVariable = doc.textVariables.item("Chapter Number")
set textVariable =
xmlelement.insertionPoints.lastItem().textVariableInstances.add ()
textVariable.associatedTextVariable = chapNumVariable
Thanks,
Jacintha.
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads