Concatenating text with punctuation

E

EllenM

Hello,
I'd like to write some javascript with a query. I'd like to generate some
script that looks like this:

var myDoc[NumberField] = app.openDoc("/C/AddProperties/[FilenameField].pdf",
this);

myDoc[NumberField].info.Title = "[TitleField]";

myDoc[NumberField].info.Author = "[AuthorField]";

myDoc[NumberField].info.Subject = "[SubjectField]";

myDoc[NumberField].info.Keywords = "[KeyWordField]";

myDoc[NumberField].save;

myDoc[NumberField].closeDoc(true);

Here's an example of what I'd like to see:
var myDoc = app.openDoc("/C/AddProperties/fnea0799.pdf", this);
myDoc.info.Title = "sodium lauryl sulfonate"; myDoc.info.Author = "Harold
Woodall"; myDoc.info.Subject = "sodium lauryl sulfonate"; myDoc.info.Keywords
= "sodium lauryl sulfonate,Solvent in silicone lubricant complying with
178.3570, 151-21-3"; myDoc.save;myDoc.closeDoc(true);

When I tried to concatenate the fields and text, I got an error message. It
didn't like the quotes in addition to other punctuation. Is a query the way
to go. Or would I be better served making a merge field in Word, which I'm
not so skilled at?

Thanks,
Ellen
 
Top