Change the source file of the insert text with a script

I'm looking for a way to replace existing-insert text in a document with the contents of another file (by reference), using scripts. I have a document c:\referer.fm, in which there is an insert text which the source file is: c:\A.fm

I also have c:\B.fm, and now I want to change referer.fm so that is no longer the overlay of text contains the text of A.fm, but the B.fm.

I tried this:

var doc is app. ActiveDoc;

var textinset is doc. FirstTiInDoc;

var pathtosource is textinset. TiFile;

pathtosource = "c:\B.fm";

textinset. UpdateTextInset();

But it does not work. I guess that the "pathtosource" parameter can be done this way. If someone knows a way to do it, I would greatly appreciate your help!

David

Hello David,.

You do not manipulate the text overlay, but a copy of the file in the text box. Your "pathtosource" parameter is a local copy of the property that you read from the actual text insert.

Try this code instead:

var doc is app. ActiveDoc;

var textinset is doc. FirstTiInDoc;

textinset. TiFile "c:\\B.fm".

Note that the backslash must be escaped with the backslash to make it work in a JavaScript string. To make your script Fail-Safe, test the name of file textinset before changing. You do not have the textinset that you expect to have, as might also be INSET text on master pages and reference. All inserts text are in a single linked list.

Also, update the text tagging along after that changing the path may not always work, as compared to FM, last changed the file date text inset with the last time that the textinset has been updated. To force the FM to update the textinset, you must include the following line of code after changing the filename text inset:

textinset. LastUpdate = 0;

Then, you can call the UpdateTextInset() method and it will work.

Good luck.

Jang

Tags: Adobe FrameMaker

Similar Questions

  • Basic question on how to change the menu text in the FLA file

    I'm kind new to Flash and I'm a little stuck on where I'm supposed to change the menu text in the flash file I bought (link below).
    I can see where to change the hyperlinks in the action script for each menu item, but I can't find the text (for example I want to change the word 'Our gallery' and type 'Compétitions'

    http://www.abcpchelp.com/header3_fv8.fla

    Thank you!
    This forum is very good

  • Change the icons associated with files - it is still possible; It was child's play.

    How can I change the icon associated with a file? For example, if I change the default program for an .ini file, the default icon of a page with a gear in the corner becomes a simple page and I'd rather the icon does not change... just the program I use to open the file. In the previous veersions of Windows, if you want to change the icon associated with a file, you could simply enter properties and continue. Please advise on how to adopt this change of WinVista Home Premium.

    It is not easy and involves editing the registry (this is far from as easy it was XP, that's why you're having trouble).  Here is the procedure: http://www.webtlk.com/2009/03/20/how-to-change-the-icon-assiciated-with-a-file-in-windows-vista-and-windows-7/.  I recommend before starting that you back up your registry database just to be safe.  Here's how: http://www.adamsdvds.co.uk/tutorials/vista/regedit/backup.php.

    I hope this helps.

    Good luck! Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.

  • How to change the header text in a sensitive presentation of HTML5

    I work in HR 11.0.4.291.

    This is probably a "duh" question, but I can't remember how to change the title text in the header of a sensitive layout. In the layout editor, I see that I can change the title, color and color of hover font, but where you change the actual text?

    Any help will be much appreciated.

    Can also be the title bar?

    See you soon... Rick

  • You can move the inserted text to a different location on the picture, if yes how?  How can I put the character and the Panel clause up in the photo shop when you type test?

    You can move the inserted text to a different location on the picture, if yes how?  How can I put the character and the Panel clause up in the photo shop when you type test?

    Yes.  I find it easier to type text, and then use the move tool (shortcut V) (looks like an arrow) to place it where you want.

    To bring up the character and paragraph panels go to WINDOW > CHARACTER or WINDOW > PARAGRAPH.

    I hope this helps.

  • Changing the font size change the actual text

    When I try to change the font size, changing the actual text for the number that I'm trying to change it to.

    How are you going to change your text, you can use the Caracteres Panelor options bar.

    To achieve the character Panel, use window > character:

    You should fine two places to change your text size.

    I hope this helps!

    Julia


  • 2nd post... change the ToolTip text when you hover over the buttons back and forward in the main play bar?

    Is it possible to change the ToolTip text when you hover over the back and transmit buttons in the main PlayBar to something other than back and forth?

    Thank you

    Hello

    What is the link below help?

    Click here to see

    See you soon... Rick

    Useful and practical links

    Captivate wish form/Bug report form

    Certified Adobe Captivate training

    SorcerStone blog

    Captivate eBooks

  • How to change the label text in the search form?

    Hi all!
    JDev 11g ADFBC

    How to change the label text in the search form?

    Yes, I use af:query

    It would be based on a ViewCriteria in your VO. The labels on the request form are the same that you set in your advice to display attribute in the VO

  • I need to change the default 'open with' Bridge of photoshop to photoshop CC 2015.  How do I do that?

    I need to change the default 'open with' Bridge of photoshop to photoshop CC 2015.  How do I do that?

    Hi karen,.

    It can get a bit tangled. Bridge delay normally to some think the Finder is the default, and every OS has its own way for you to tell the OS what you say should be the default value. On Mac, it's in the file information dialog box. I think that Windows called something like properties. You can change an extension to open all files with an application in your operating system first, restart Bridge and see if she pays tribute to this choice by double clicking on a file and observing that it opens the right version of PS. normally, it will be. (By default) must also appear after this choice in the list open with contextual (right click on the file you want to open, select open with and find the name of the application in the list).

    If this does not work, you will need to manually choose your file association for the extension of the list next to him in the Bridge preferences > File Associations. Which is normally necessary only when you want to override the default choice of your OS System. For example, maybe you want to bridge to open in PS JPEG files when you double-click it in Bridge, but if you double-click on a file in the Finder/Explorer JPEG, you want to open with Viewer of this system. It will not say it is (by default) in the pop-up list more, but bridge will honor your file associated with the choice of your system.

  • Cannot change the ASPX page with Webdav connection

    I can't change the ASPX pages with webdav on my IIS6/win03 server connection. I connect to the site very much, but when I press the edit button I get an error message stating 'cannot lock the page for editing at the moment. Try again later. "I can edit pages html very well. I can edit ASPX pages if my connection is set to network and I am on a network share. I have even another server where I can connect with webdav and editing ASPX pages.

    Looks like a configuration problem on this particular server, but I have no idea what it is, and I can't find answers. Anyone had this problem before? How did you solve this problem?

    I tried to delete the LCK and defining files and the files from scratch, no luck.

    THX

    OK, I thought about it. If you run 2 sites in IIS, you must take pages aspx on extensions to the application. Go to the properties on the site that you have the connection to via Webdav and click the configuration button. Remove the entry for the aspx extension.

    I guess this is the answer for people having problems with other pages such as php and asp, server-side

  • I changed the my imac with a new drive and I lost the original CD/DVD which came with the new Mac.

    I changed the my imac with a new drive and I lost the original CD/DVD which came with the new Mac.

    and when I go to install the mac lion antiracism apple with reticle logo means error

    what can I do with these

    Please help money

    You can get the replacement system install & Restore CD/DVD of the customer support of Apple - to the United States, (800) 767-2775-for a sum low S & h. you will need to have the model or the serial number of your Mac available.

    If you are not in the United States, you may need to go through the regional Apple Store that serves your location to find the phone number. Here is a list of links to all - http://store.apple.com/Catalog/US/Images/intlstoreroutingpage.html , another resource: International Support Phone #s.

  • Change the Bitlocker pin with Admin rights

    Hi, is it possible to change the Bitlocker PIN with admin rights

    Also where that PIN is stored?

    Thanks in advance

    The answer is to write a windows service and have a program to interact with this service and have it launch the locker of bit program.

    Because the service runs under the system account, the program run by there the higher privilege.

  • How can I change the country associated with my account. I need to make an urgent purchase?

    I need to make a purchase, and I can't do it because I need to change the country associated with my account. What is the best way to do it without re-creating a new account?

    That's the best you can do (with the help of Adobe):

    Change the country associated with your Adobe ID

  • How to change the white text and more light colours of text and illustrations to deep colors or provide a deeper black outline, so that they are legible?

    I noticed that the illustrations and white text are not readable as well as light colored fonts that I use. I have consulted with Microsoft and other help sections various areas recommended, but impossible to find what is the problem and how to solve these problems. In order to clarify, for example, if I go on a site that displays white text anywhere on the screen, or illustrations in white, I can't read or see anything even if I do expand. I tried to innovate in following things suggested in onlne Microsoft Help related to the resolution section, but can't find anything on this specific problem when I do a search. I tried to change my display resolution settings, change the background color of my screen, themes and even the font colors, but nothing changes for the problem. I also noticed that any file in my computer appearing in any color of light is also hard to read. I must not do something correctly, but I don't know what. It's a pain for example, when I go to a site, and the white text and illustrations appear, but do not have any black outlining. Magnification just leads to the same result. Can anyone identify which is the problem, the settings on which I should be focusing and provide instructions on how to fix this?  I use Windows Vista Home Premium and I am a layman when it comes to computers.

    Hello

    You can check out the articles below and check if that helps:

    Make the text easier to read using ClearType

    http://Windows.Microsoft.com/en-us/Windows-Vista/make-text-easier-to-read-using-ClearType

    ClearType: Frequently asked questions

    http://Windows.Microsoft.com/en-us/Windows-Vista/ClearType-frequently-asked-questions

    Make the text on the screen larger or smaller

    http://Windows.Microsoft.com/en-us/Windows-Vista/make-the-text-on-your-screen-larger-or-smaller

    Hope this helps,

  • change the existing text

    Hello.. I don't know if this has been answered before, and if there I'm sorry to ask again... am really new to illustrator and was hoping to find out if it was somehow possible to change the text in an existing .ai file... I had asked someone to create a logo for me using Adobe Illustrator, and he did a great job, but has made a few spelling errors in the text of the logo... How can I change this? Thanks in advance...

    Yes.

Maybe you are looking for