How to import rtf file?


hi.

 

i want import file in text frame.

 

txt file possible. rtf file bring code.

 

 

 

             var filepath = "c:/temp/txt/" + filename;             var txtfile = new file(filepath);             var txtfilecontents;                  if(txtfile.exists)             {                 var txtfileopenflag = txtfile.open("r");                    if(txtfileopenflag == true)                 {                     txtfilecontents = txtfile.read();                 }             }             app.selection[0].contents = txtfilecontents;   

 

how import rtf file?

 

thanks.

hi,

 

while import file there no need open , read contents (by script)

use:

app.selection[0].place(txtfile) method

 

jarek



More discussions in InDesign Scripting


adobe

Comments

Popular posts from this blog

after effects warning: unable to create drawing surface

Maximum number of authorizations reached!