Auto insertion of and

Hello
A while ago I asked if it was possible to auto insert ® and ™ in a document. Peter kindly gave me the following script:
1. Open all documents that need to be checked.
2. Then open a document with the list of names, each name followed either bt (tm) or (r), e.g.
Adobe®
InDesign™
One name per line, each name followed by a symbol.
3. Run this script -- which works in CS3 and later:
app.findGrepPreferences = app.changeGrepPreferences = null;
var list = app.selection[0].parentStory.contents.split ("\r");
for (var i = 0; i < list.length; i++)
  var name = list[i].slice (0,-1);
  var marker = list[i].slice (-1);
  for (var j = 0; j < app.documents.length; j++)
    app.findGrepPreferences.findWhat = name + "(?!" + marker + ")";
    app.changeGrepPreferences.changeTo = name+marker;
    app.documents[j].changeGrep()
Peter This worked fine but the list of words requiring a ® or ™ has grown. We now have a series of words that require a ® or ™. For example, say the word
dave originally needed a ® but now the words dave smith need a ® too. Using the current script above the first mention of dave is fine but when it
comes to dave smith i get the following result: dave® smith® when I really want this: dave smith®
We have a large catalogue to produce and manually searching for a list of ® and ™ takes a very long time so automation appears to be the way to go.
Thanks for your time and help!
Gary

Hi Peter
I have tried this but it doesn't quite work. I have set up a some test files. In my source list i have:
hello®
In my destination file I have:
HELLO
hELLO
When I run the script I get the following result:
Hello®
hello®
The script is actually changing the case of some of the characters. We need it to not change any of the characters but recognise the word and add the ™ or ®. We need it to give the following result:
HELLO®
hELLO®
This is how the script looks now:
app.findGrepPreferences = app.changeGrepPreferences = null;
app.findGrepPreferences.strikeThru = false;
app.changeGrepPreferences.strikeThru = true;
var list = app.selection[0].parentStory.contents.split ("\r");
for (var i = 0; i < list.length; i++)
  var name = list[i].slice (0,-1);
  var marker = list[i].slice (-1);
  for (var j = 1; j < app.documents.length; j++)
   app.findGrepPreferences.findWhat = "(?i)" + name + "(?!" + marker + ")";
    app.changeGrepPreferences.changeTo = name+marker;
    app.documents[j].changeGrep();
app.findGrepPreferences = app.changeGrepPreferences = null;
app.findGrepPreferences.strikeThru = true;
app.changeGrepPreferences.strikeThru = false;
for (var j = 1; j < app.documents.length; j++)
    app.documents[j].changeGrep();
Thanks
Gary

Similar Messages

  • Master-Detail and Auto Insert Detail rows

    Apex 3.0
    I'm trying to do a Master-Detail form. I have it set to stay on the same page when I Create a new Master Record.
    Now, what I would like to do is auto insert data into the Detail Rows some predefined information and have it ready for the user to enter the rest of the information. I did this by creating a Page Process to trigger on the Add Row button for the Details region. The code I used is:
    begin
    insert into purch_insurance_type (Contract_ID, INSURANCE_TYPE) values(:P7_Contract_ID, 'General');
    insert into purch_insurance_type (Contract_ID, INSURANCE_TYPE) values(:P7_Contract_ID, 'Automobile');
    insert into purch_insurance_type (Contract_ID, INSURANCE_TYPE) values(:P7_Contract_ID, 'Excess');
    insert into purch_insurance_type (Contract_ID, INSURANCE_TYPE) values(:P7_Contract_ID, 'Workers Comp');
    insert into purch_insurance_type (Contract_ID, INSURANCE_TYPE) values(:P7_Contract_ID, 'Others (Builders Risk)');
    end;
    P7_Contract_ID is the PK on the Master table and I predefine the Insurance Type. The rest of the table the user is able to enter as needed.
    When I run it, the new rows show up but the Insurance Type is NULL and browsing from one record and back the new rows are gone. It seems like the PK for the Detail rows are not being filled. I have a Sequence Trigger set to fire on Update:
    CREATE OR REPLACE TRIGGER "BI_PURCH_INSURANCE_TYPE"
    before insert on "PURCH_INSURANCE_TYPE"
    for each row
    begin
    if :NEW."INSURANCE_TYPE_ID" is null then
    select "PURCH_INSURANCE_TYPE_SEQ".nextval into :NEW."INSURANCE_TYPE_ID" from dual;
    end if;
    end;
    ALTER TRIGGER "BI_PURCH_INSURANCE_TYPE" ENABLE
    What am I missing? Any ideas or suggestions?

    Hi All!
    I think there is no solution to this problem, only single selection is the solution.
    If any one has anyother solution plz let me know.
    Thanks and regards.
    Abbasi

  • Where do I specify text COLOR for PcP auto-inserted titles

    I'm running PcP on 10.5 and want to change the COLOR of the title text that PcP auto-inserts into my video when I run a submit for approval workflow. Anyone know where the color is defined?

    No 10.5 system at hand anymore to check but I am pretty sure the color is defined directly inside the quartz composition that is used by the command in the workflow to compose the title.

  • How to auto insert a number array with size of 20 into a named excel file with the positon is from A1 TO A20?i use lv6.1

    can you give me a example vi for it ?thanks a lot!
    how to auto insert a number array with size of 20 into a named excel file  with the positon is from A1 TO A20?i use lv6.1

    You don't need us to give you an example, as the example already comes with LV. Go to Help>>Find Examples and search for "excel". You will find an example called "write table to XL". You should note that the example doesn't do that exactly, because it writes a 2D array from 2 to N.
    You can modify the example by using only one for loop (instead of nested loops) with a 1D array or by going into the Set Cell Value and modifying it to accept a second cell value for the Cell2 terminal and wiring in a 1D array instead of the single string. If you do modify it, be sure to save it under a different name, so you don't overwrite the original.
    To learn more about LabVIEW, I suggest you try searching this site and google for LabVIEW tutorials. Here and here are a couple you can start with. You can also contact your local NI office and join one of their courses.
    In addition, I suggest you read the LabVIEW style guide and the LabVIEW user manual (Help>>Search the LabVIEW Bookshelf).
    Try to take over the world!

  • How to Change Outlook Default Folder for Insert-Attachment and Save Email/Attachemnt while Outlook is open (VBA)

    Hello,
    Office 2010 32bit, VBA
    Is it possible to programmatically do the above while Outlook is running?  If so, I'm hoping to make that change from a Word macro.
    I tried tinkering with the reg key and that doesn't work because it appears Outlook only respects it at startup time. Similary changing Word File-options-location of documents is respected only when Outlook starts.
    I'm looking to seamlessly keep Outlook's default folder in sync with Word's default folder as the users change working folders in Word, which they do many times per day (and they chose the folder among a couple of thousand possibilities).
    I'm hoping there is a difficult-to-find Outlook object I can manipuate to get to the end result.  IF there is such an Object I have been unable to find it.
    Many thanks!
    Julie

    Hi Julie,
    Based on my research, I think outlook object model doesn’t provide the way to change the default folder for insert attachment and save email/attachment.
    The way to change it is that we need to modify the registry setting and the outlook app should be restart.
    # How to set the default attachment folder in Outlook
    https://support.microsoft.com/kb/252732?wa=wsignin1.0
    You may create the add-in to custom these actions (e.g. attach attachment, save email)
    Regards
    Starain
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • I have a MacBook Pro, I want to copy Itunes files to an SD card to play in my car, the SD Card doesn't appear in Itunes when I insert it, and I don't know how to convert the files to the correct format, can anyone help?

    I have a MacBook Pro, I want to copy Itunes files to an SD card to play in my car, the SD Card doesn't appear in Itunes when I insert it, and I don't know how to convert the files to the correct format, can anyone help?
    Thank you

    So it seems from reading the COMMAND manual that my first issue is that I used a 16GB SD card, and the manual says it will only recogize up to a 2GB SD card. I did use my MB Air's SD card slot and crated a folder and dragged the music files to it, then to the card. So I am going to get a 2GB card and try that next. Otherwise just stick with the iPOD connected. At least that is 8GB

  • Hi, can someone please tell me why the spell check in pages doesn't work. I went to preferences and enabled this auto spell checker and have set the language to british english. But still it doesn't work while it works perfectly in TextEdit.

    Hi, can someone please tell me why the spell check in pages doesn't work. I went to preferences and enabled this auto spell checker and have set the language to british english. But still it doesn't work while it works perfectly in TextEdit.

    Inspector > Text > More > Language
    Only applies to selected text, like making it a particular font.
    It is not a setting that sticks. If you continue to paste in text from elsewhere particularly the Internet it will have a different or None language set to it. You need to select it and make it B.E.
    Peter

  • Trying to do a insert activity and fire a  skill buildmodal window  on butt

    I am trying to do insert activity on my form..so for that button action type is ..submit form... withdatabase action as insert..
    While i also need to execute a modal window trigger.. so then the button type action needs to be redirect to url ..
    How can i get it accomplished on same button....
    I also tried the following
    made the button ..as redirect to url..
    and wrote dynamic action ..
    1 Plsql code .. insert into table_x (a,b.c) from (:a,:b,:c) page submit (:a,:b,:c)
    but after i close the plsql cod e the page submit fields become a,b,c
    and then this part of code donot exist
    while the second dynamic aciton is on
    modal window..
    When i do this buttacion acction type is redirect to url..
    I tried this method and it fails..
    How can we        get a button to do .. Both submit a form for insert activity and also ...redirect a url to execute a skill builder modal window
    Edited by: susf on Jun 22, 2012 7:15 PM

    just got it sorted..it was issue of me adding :empno , etc in sumbit..
    I should not be adding ':'...
    page submit (:a,:b,:c)
    it should have been page submit (a,b,c)
    Edited by: susf on Jun 22, 2012 7:51 PM

  • Inserting filename and page numbers into multiple PDF files?

    Have since seen this thread, BUT still interested in the syntax of the code
    to insert filename and page # into multiple files:
    http://forums.adobe.com/thread/951925?tstart=0
    Good Evening (GMT!)
    I have approx 100 PDFs with one or two pages in each, they are English translations
    of Russian language test certificates and the formatting/feel of the originals is lost in
    the translations. The only real link between the two sources is the "_RUS" and "_ENG"
    filename suffixes and the common leading filenames otherwise. Thus I need to maintain
    a record of the filename in any page I print off, should there be a need to refer back to
    the original if the translation is open to artistic licence.
    I have a script (below) that happily adds a page x/y and filename into the active file,
    what I would like is to be able to do this insertion into multiple files as defined by a
    portfolio or a selection via a select files dialogue box
    I am quite out of my depth now as my past skirmishes with JavaScript have set
    cookies and tweaked a few other browser doodads in webauthoring
    Any help most appreciated on this one...
    Kind Regards
    Dr B
    Southampton
    UK
    NB the filename inserted may be corrupted as a result of my last tweakings
    will sort that one out ASAP....
    ================================
    // SetRemoveFooter
    // Modified as marked
    // Menu item generation
    app.addSubMenu({ cName: "Footer",cUser: "Set/Remove Complex Footer", cParent: "File", nPos: 20 });
    app.addMenuItem({ cName: "Set Filename", cParent: "Footer", cExec: "SetFooter(1)"});
    app.addMenuItem({ cName: " -> Set Date .... centered", cParent: "Footer", cExec: "SetFooter(2)"});
    app.addMenuItem({ cName: " -> Set Date .... right", cParent: "Footer", cExec: "SetFooter(3)"});
    //add page x of y
    app.addMenuItem({ cName: "Set Page ", cParent: "Footer", cExec: "SetFooter(4)"});
    app.addMenuItem({ cName: "Set Both", cParent: "Footer", cExec: "SetFooter(5)"});
    app.addMenuItem({ cName: "-------------------------------", cParent: "Footer",cExec: "{}"});
    app.addMenuItem({ cName: "Remove Both", cParent: "Footer", cExec: "RemoveFooter(5)"});
    app.addMenuItem({ cName: "Remove Date Time (Filename)", cParent: "Footer", cExec: "RemoveFooter(1)"});
    app.addMenuItem({ cName: "Remove Page", cParent: "Footer", cExec: "RemoveFooter(4)"});
    //=====================================================================================
    //Set/remove Footer
    function SetFooter(ARG)
    var re = /.*\/|\.pdf$/ig;
    var FileNM = + this.path.replace(re,"")+".pdf";
    var Path = this.path;
    var AcDate = new Date();
    var AcDateFormat = "dd/mm/yyyy"
    var Box2Width = 100
    for (var p = 0; p < this.numPages; p++)
    var aRect = this.getPageBox("Crop",p);
    var TotWidth = aRect[2] - aRect[0]
    if (ARG<=3 || ARG==5)
    {var fd = this.addField("xftDate", "text", p, [30,15, TotWidth-30-30,30]);
    //print output?
    fd.value = util.printd(AcDateFormat, AcDate) + " (" + FileNM +")";
    // TEXT SIZE SETTING
    fd.textSize=12; fd.readonly = true;
    if (ARG==1){ fd.alignment="left" };
    if (ARG==2){ fd.alignment="center" };
    if (ARG==3){ fd.alignment="right" };
    if (ARG==4 || ARG==5)
    {var bStart=(TotWidth/2)-(Box2Width/2)
    var bEnd=((TotWidth/2)+(Box2Width/2))
    var fp = this.addField(String("xftPage"+p+1), "text", p, [bStart,30,bEnd,15]);
    // print output?
    fp.value = "Page: " + String(p+1)+ "/" + this.numPages;
    // TEXT SIZE SETTING
    fp.textSize=12; fp.readonly = true;
    fp.alignment="center";
    //==========================================================================
    function RemoveFooter(ARG)
    if (ARG<=3 || ARG==5) {var x = this.removeField("xftDate");}
    if (ARG==2 || ARG==5) {for (var p = 0; p < this.numPages; p++)
    var x = this.removeField(String("xftPage"+p+1)); }
    will

    Putting this in a batch file within the automation function of Acrobat
    delivers the goods, I need to investigate the formatting of the output to
    get them to line up, have taken the middle ground and gone for a central
    position for the page x/y text...... some lines are redundant
    Dr B
    ===========================================
    var re = /.*\/|\.pdf$/ig;
    var FileNM = this.path.replace(re,"")+".pdf";
    var Path = this.path;
    var AcDate = new Date();
    var AcDateFormat = "yyyy/mmm/dd  HH:MM"
    var Box2Width = 50
    for (var p = 0; p < this.numPages; p++)
    var aRect = this.getPageBox("Crop",p);
    var TotWidth = aRect[2] - aRect[0]
           var fd = this.addField("xftDate", "text", p, [30,15,
    TotWidth-30-30,30]);
           fd.value =  FileNM;
           fd.textSize=12; fd.readonly = true;
           fd.alignment="left";
    var bStart=(0);
    var bEnd=(TotWidth);
           var fp = this.addField(String("xftPage"p1), "text", p,
           fp.value = "Page: " + String(p1) "/" + this.numPages;
           fp.textSize=12;  fp.readonly = true;
           fp.alignment="center";

  • Insert,update and delete data in a table using webdynpro for abap

    Dear All,
    I have a requirement to create a table allowing the user to add rows in it and update a row as well as delete a row from that table.To do this I guess I have to make use of ALV.But using ALV I am not able to enter data to a table where as I can make a column editable delete a row etc. please guide me to perform these operations(insert,update and delete) on table.
    Thanks,
    Reddy.

    Hi Sridhar,
    By using ALV you can do all insert delete etc things. if you want to edit i mean you can yenter data in ALV.
    Check this...
    http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/3133474a-0801-0010-d692-81827814a5a1
    Editing alv in web dynpro
    editing rows in alv reports
    Re: editing rows and columns in alv reports in webdynpro abap
    Cheers,
    Kris.

  • Insert Month and Year

    Table ( In-focus)
    CREATE TABLE "LIBRARY"."INFOCUS_LOG"
    ("LOGDATETIME" DATE,
    "COUNTER" NUMBER(6,0)
    Procedure
    create or replace PROCEDURE IN_FOCUS_PAGE
    (ldt INFOCUS_LOG.logdatetime%TYPE,
    COT INFOCUS_LOG.counter%TYPE)
    IS
    BEGIN
    INSERT
    INTO INFOCUS_LOG
    VALUES(ldt, COT);
    DBMS_OUTPUT.PUT_LINE('RECORD IS ADDED......!');
    COMMIT;
    END IN_FOCUS_PAGE;
    What do I need to do if I want to insert month and year only for this particular table.
    Result Example:
    JAN-2007
    FEB-2007
    MAR-2007
    Message was edited by:
    user579538

    A DATE is always going to have a full day and time component, so you cannot store just the month and year. You can, of course, choose to display just the month and year, i.e.
    SELECT TO_CHAR( date_column, 'MON-YYYY' )
      FROM some_tableor to extract the month and year separately
    SELECT EXTRACT( year from date_column ) yr,
           EXTRACT( month from date_column ) dt
      FROM some_tableJustin

  • Insert pictures and video

    Hello,
    How can I insert videocuts into a show I recorded myself? I am in the studio, presenting a show and during the presentation I want to show pictures and video to the audience.
    * I wil first record the show in our studio
    * And then I insert pictures and video on certain places in the recorded show.
    Is this possible in Imovie 8 or in one of the older imovies.
    Or must I use finalcut for this?
    Thanks! Richard - The Netherlands

    Hello, Richard,
    I have not used iMovie 8 much, so don't know about doing this in that version, but you can easily do this in iMovie HD 6.
    I am not sure exactly how you want to do this. It depends on whether you want to place those photos and other video clips OVER the recorded show, so that the audio from the recorded show plays while the photos and videos are displayed, or if you want to have them ADDED in the midst of the recorded show.
    If you just want to insert photos and videos in the midst of your recorded show, first import your recorded show into iMovie6. Put it in the timeline. Move the playhead to the point where you want the first photo, and do a 'split video at playhead' command, drag the photos/videos to the time line there. They will be added between the split video clips. Repeat for all the photos/videos.
    It sounds as if the option you want is 'Paste Over at Playhead' which allows the photos and videos you add to be seen over the recorded show, so that the audio plays continually. In tv and movies this is done when someone is talking about something and then there is a 'cut-away' to a photo or video clip of whatever the person is describing so the audience can visualize what he is saying while he is speaking.
    Here are instructions for doing that from iMovie HD6 Help:
    *Inserting video clips or photos in a passage while maintaining running audio*
    +You can paste a new video clip or photo over an existing clip while retaining the audio from the original clip. The video cuts away to a new picture, but you continue to hear the sound from the original clip.+
    +To replace images in a clip while maintaining running audio:+
    +Choose iMovie HD > Preferences, and then click General.+
    +Select the "Extract audio when using Paste Over at Playhead" checkbox.+
    +Select the video or photo that you want to insert.+
    +Choose Edit > Cut or Copy.+
    +Do one of the following:+
    +To paste the entire video you selected in step 3, position the playhead at the first frame to be replaced. When you paste the clip, it will replace a portion of video equal to its length.+
    +To paste over a specific segment of your movie, select the part of the video clip you want to paste over. (To learn more about selecting part of a video clip, see Related Topics below.)+
    +If the video you're pasting is longer than the selected frame range, the excess video will not be pasted. If the video you're pasting is shorter than the selected frame range, the extra space will be filled with a color clip (or the still image, if you paste a still image).+
    +Choose Advanced > "Paste Over at Playhead."+
    +The audio track of the original video is retained and appears in audio track 1 of the timeline viewer.+
    Post back if this does not address what you are trying to do.

  • Insert Date and Time doesn't update

    i am inserting a date and time in my numbers documents so that i know which paper copy is the most current. i do this by going to Insert pulldown and selecting Data and Time while in a Footer Cell.
    this data does not update upon re-opening the file and i end up printing multiple copies over weeks and months with simply the date that I inserted the Date and Time into the footer.
    is there a way to do this so that it updates?
    TIA

    As most of the times,
    this kind of question is answered in Numbers User Guide.
    When you insert a date_time value in a cell, you insert a fixed value.
    If you want a living one, you must insert a formula.
    =NOW()
    or
    =TODAY()
    would achieve your goal.
    Yvan KOENIG (VALLAURIS, France) dimanche 25 décembre 2011 21:40:50
    iMac 21”5, i7, 2.8 GHz, 12 Gbytes, 1 Tbytes, mac OS X 10.6.8 and 10.7.2
    My iDisk is : <http://public.me.com/koenigyvan>
    Please : Search for questions similar to your own before submitting them to the community

  • Insert date and time

    This is a simple question but one that has been bugging me in a small way. If on a spreadsheet I press 'insert date and time' all I get is that day and date for example saturday 10th July 2010 and no time.
    Anyone offer an explanation for this?
    Thanks
    Mike

    Hello Peggy
    The problem was already reported to Bugs Hunters :
    +Bug ID# 7862838.+
    +In Numbers and Pages there is the function+
    +Insert > Date Time.+
    +At this time, its default behaviour is : insert the current date and the time 12:00:00 (without displaying the time).+
    +Given my own experience and what is often asked in Discussions forums, it would be interesting to change the default setting so that it inserts the current date & time and display both of them.+
    +Of course some users wish the availability of three items:+
    +Insert > Date defaulting to the sole date component+
    +Insert > Time defaulting to the sole time component+
    +Insert > Date & Time defaulting to the complete current dateTime.+
    +I preferred the scheme defaulting with the complete current dateTime because removing one component is faster than adding one using the existing protocol.+
    Yvan KOENIG (VALLAURIS, France) samedi 10 juillet 2010 19:05:47

  • Insert, update and delete trigger over multiple Database Links

    Hello guys,
    first of all I'll explain my environment.
    I've got a Master DB and n Slave Databases. Insert, update and delete is only possible on the master DB (in my opinion this was the best way to avoid Data-inconsistencies due to locking problems) and should be passed to slave databases with a trigger. All Slave Databases are attached with DBLinks. And, additional to this things, I'd like to create a job that merges the Master DB into all Slave DB's every x minutes to restore consistency if any Error (eg Network crash) occurs.
    What I want to do now, is to iterate over all DB-Links in my trigger, and issue the insert/update/delete for all attached databases.
    This is possible with the command "execute immediate", but requires me to create textual strings with textually coded field values for the above mentioned commands.
    What I would like to know now, is, if there are any better ways to provide these functions. Important to me is, that all DB-Links are read dynamically from a table and that I don't have to do unnecessary string generations, and maybe affect the performance.
    I'm thankful for every Idea.
    Thank you in advance,
    best regards
    Christoph

    Well, I've been using mysql for a long time, yes, but I thought that this approach would be the best for my requirements.
    Materialized View's don't work for me, because I need real-time updates of the Slaves.
    So, sorry for asking that general, but what would be the best technology for the following problem:
    I've got n globally spread Systems. Each of it can update records in the Database. The easies way would be to provide one central DB, but that doesn't work for me, because when the WAN Connection fails, the System isn't available any longer. So I need to provide core information locally at every System (connected via LAN).
    Very important to me is, that Data remain consistent. That means, that it must not be that 2 systems update the same record on 2 different databases at the same time.
    I hope you understand what I'd need.
    Thank you very much for all your replies.
    best regards
    Christoph
    PS: I forgot to mention that the Databases won't be very large, just about 20k records, and about 10 queriees per second during peak times and there's just the need to sync 1 Table.
    Edited by: 907142 on 10.01.2012 23:14

Maybe you are looking for