Paste In Place to Specify Master Page

Hi,
Can you make a script for  app.pasteInPlace() into master A in all my opening document?
I want to paste in place an object to all the opening document's "master A" by script, is that possible?
John White

Hi Jarek,
I am a beginner for script, it’s so hard to write this script by my self,
I found somewhere has this script which made by Laubender:
var oldPasteRem = app.clipboardPreferences.pasteRemembersLayers; 
//uncheck “Paste Remembers Layers” 
app.clipboardPreferences.pasteRemembersLayers = false; 
for (i = 0; i < app.activeDocument.layers.length; i++) { 
    //Maybe the user does not want objects pasted to invisible layers:  
    if(app.activeDocument.layers[i].visible == true && app.activeDocument.layers[i].locked == false) { 
        app.activeDocument.activeLayer = app.activeDocument.layers[i]; 
        app.pasteInPlace(); 
//Restore the old condition: 
app.clipboardPreferences.pasteRemembersLayers = oldPasteRem;
so can you help me to change it’s function for paste in place on master page?

Similar Messages

  • Paste in place to next Master unfunction, can you fix it?

    Hi, everyone
    I got this script, which copy from:
    Paste In Place to Specify Master Page
    I change it into:
    var myDialog = app.dialogs.add({name:"Copy Select item to next Master",canCancel:true});
    with(myDialog){
        with(dialogColumns.add()){
        staticTexts.add({staticLabel:"Select a Master you want to copy to"});
            with(dialogRows.add()){
               var mySelection = dropdowns.add({stringList:["Master A", "Master B","Master C", "Master D", "Master E","Master F", "Master G"], selectedIndex:0});
    if (myDialog.show() == true)
    function main(){
      if("Copy to next Master");
          copy_to_next_master(); 
    function copy_to_next_master() { 
        if (mySelection.selectedIndex == 0){
    var nSel = app.selection.length;   
    for ( var i = 1; i < app.documents.length; i++) {   
            var nextDoc = app.documents[i];   
            if (!nSel) { alert( "Nothing selected!" ); exit(); } 
            for ( var n = 0; n < nSel; n++ ) { 
                var curSel = app.selection[n]; 
                curSel.duplicate( nextDoc.masterSpreads[0] ); 
    alert("Done.\rWhat you select are pasted in place to next documents' Master  A");
        if (mySelection.selectedIndex == 1){
    var nSel = app.selection.length;   
    for ( var i = 1; i < app.documents.length; i++) {   
            var nextDoc = app.documents[i];   
            if (!nSel) { alert( "Nothing selected!" ); exit(); } 
            for ( var n = 0; n < nSel; n++ ) { 
                var curSel = app.selection[n]; 
                curSel.duplicate( nextDoc.masterSpreads[1] ); 
    alert("Done.\rWhat you select are pasted in place to next documents' Master  B");
        if (mySelection.selectedIndex == 1){
    var nSel = app.selection.length;   
    for ( var i = 1; i < app.documents.length; i++) {   
            var nextDoc = app.documents[i];   
            if (!nSel) { alert( "Nothing selected!" ); exit(); } 
            for ( var n = 0; n < nSel; n++ ) { 
                var curSel = app.selection[n]; 
                curSel.duplicate( nextDoc.masterSpreads[2] ); 
    alert("Done.\rWhat you select are pasted in place to next documents' Master  C");
        if (mySelection.selectedIndex == 1){
    var nSel = app.selection.length;   
    for ( var i = 1; i < app.documents.length; i++) {   
            var nextDoc = app.documents[i];   
            if (!nSel) { alert( "Nothing selected!" ); exit(); } 
            for ( var n = 0; n < nSel; n++ ) { 
                var curSel = app.selection[n]; 
                curSel.duplicate( nextDoc.masterSpreads[3] ); 
    alert("Done.\rWhat you select are pasted in place to next documents' Master  D");
        if (mySelection.selectedIndex == 1){
    var nSel = app.selection.length;   
    for ( var i = 1; i < app.documents.length; i++) {   
            var nextDoc = app.documents[i];   
            if (!nSel) { alert( "Nothing selected!" ); exit(); } 
            for ( var n = 0; n < nSel; n++ ) { 
                var curSel = app.selection[n]; 
                curSel.duplicate( nextDoc.masterSpreads[4] ); 
    alert("Done.\rWhat you select are pasted in place to next documents' Master  E");
        if (mySelection.selectedIndex == 1){
    var nSel = app.selection.length;   
    for ( var i = 1; i < app.documents.length; i++) {   
            var nextDoc = app.documents[i];   
            if (!nSel) { alert( "Nothing selected!" ); exit(); } 
            for ( var n = 0; n < nSel; n++ ) { 
                var curSel = app.selection[n]; 
                curSel.duplicate( nextDoc.masterSpreads[5] ); 
    alert("Done.\rWhat you select are pasted in place to next documents' Master  F");
        if (mySelection.selectedIndex == 1){
    var nSel = app.selection.length;   
    for ( var i = 1; i < app.documents.length; i++) {   
            var nextDoc = app.documents[i];   
            if (!nSel) { alert( "Nothing selected!" ); exit(); } 
            for ( var n = 0; n < nSel; n++ ) { 
                var curSel = app.selection[n]; 
                curSel.duplicate( nextDoc.masterSpreads[6] ); 
    alert("Done.\rWhat you select are pasted in place to next documents' Master G");
    but unfunction, can you fix it?
    thanks
    Teetan

    Hi,
    Modifying your code - notice that function main() suppose to be
    1. defined and
    2. called
    Compare it to this code:
    #target  indesign
    var
      myDialog = app.dialogs.add({name:"Copy Selected item(s) to chosen Master",canCancel:true}),
      mStringList = ["Master A", "Master B","Master C", "Master D", "Master E","Master F", "Master G"];
    with(myDialog){
      with(dialogColumns.add()){
      staticTexts.add({staticLabel:"Select a Master you want to copy to"});
      with(dialogRows.add()){
      var mySelection = dropdowns.add({stringList:mStringList, selectedIndex:0});
    main();
    function main(){
      if (!app.documents.length || !app.selection.length)
      alert( "Nothing selected!" );
      exit();
      if (myDialog.show() == true)
      copy_to_next_master();
    function copy_to_next_master() {
    var
      mChoice = mySelection.selectedIndex,
      mMsg = "Done.\rWhat you select is pasted in place to next documents - " + mStringList[mChoice],
      nSel = app.selection.length,
      mDone = false,
      i,n,nextDoc,curSel;  
    for ( i = 1; i < app.documents.length; i++) {  
      nextDoc = app.documents[i];  
      targetMaster = nextDoc.masterSpreads[mChoice];
      if (!targetMaster.isValid) {
      mMsg += "\rCan't detect " + mStringList[mChoice] + " in a doc: " + nextDoc.name;
      continue;
      mDone = true;
      for ( n = 0; n < nSel; n++ ) {
      curSel = app.selection[n];
      curSel.duplicate( nextDoc.masterSpreads[mChoice] );
    mDone ? alert(mMsg) : alert("Nothing copied");
    Jarek

  • Content place holder in master page

    I have created one master page and applied it to SP 2013 site and moved the content place holder at center of the page.
    My master page is like top bar as a logo and leftside navigation. So, the content place holder is just down of top bar and right of left navigation.
    Now i need to hide/remove all default links appearing at content place holder and have to place my required link. like blogs, news feed. some webpart.
    Pleae tell the way how can i hide/remove the default links and put my required links.
    Thanks in adv !!

    Suggest you for create a new layout page for homepage and set the custom masterpage as default one. And do your customization using new-layout page and set as home page.
    For reference
    http://msdn.microsoft.com/en-us/library/jj191506%28v=office.15%29.aspx
    http://blog.navantis.com/create-a-custom-page-layout-in-sharepoint-2013/
    -- Vadivelu B Life with SharePoint

  • How to specify Master page depending on odd or even first page

    We've set up our books to delete empty pages and so that we have chapters starting on both odd and even pages. Also, the first pages of our chapters are formatted differently than the rest of the Left and Right Master pages. We would like to have two Master pages for the first page of the chapter, one for odd pages and the other for even, so that we can offset the margins, leaving a larger margin on the side towards the binding.
    My question is how do I set up the book so that when it generates, if the chapter starts on an odd page, it automatically applies the Master page for odd first pages and when the first page is even, it applies the Master page for even first pages?
    We have FramMaker 8 and are running it on Windows XP Professional.
    Thanks,
    Tim

    Assuming that you want this to happen automagically, I'd use the system default Right and Left Master pages as your chapter opener pages because Frame will apply those automatically depending on how the pages and chapters fall in the book. Then set up the internal chapter pages with whatever other structure you're using and apply those internal masters to the normal content that as you go.
    If you can't do that for some reason, I would look at doing it with a FrameScript that goes through the book and applies the alternating pages as a final production step.
    You could set up the first tag in the chapter to call a specific master page, but that would be manual and could quickly go south if any chapters ahead of a given chapter change the pagination. It would have to be manual because a given tag can only call one master page -- there isn't a way to apply logic to call one or the other depending on the situation.

  • Need script to insert pages with specified master

    Several years ago, someone here (I think Dave, maybe Ole) helped me out by giving me a short script that when run added a blank page (with a specified master page different from the previous page) after each page of a document.
    I've had an emergency reformat of my system and have lost that script which I need constantly for work projects. I tried searching here, but it was before the current forum setup (I think around 2 years ago) and I can't find a way to get to the archives.
    If anyone can either provide me with the java script code for this or point me to the old messages about it, I'd be very appreciative.
    And, BTW, I am now using CS4 (though I'm sure the script I've been using was from an older version).
    Thank you.

    Aaahhh ... PageMaker scripting. Now there was a challenge -- I don't think I ever could write the thing I intended with that.
    This quick javascript works on CS, but I don't think the syntax has changed (much) for CS4. Yell if it doesn't work.
    Be sure to fill in the right 'blank page' name in the first line! That includes the prefix and the hyphen -- the script will alert you if you got it wrong
    //DESCRIPTION: Add Blank Master Page after each page
    masterPageName = "A-AddMe";
    masterPage = app.activeDocument.masterSpreads.item(masterPageName);
    if (masterPage == null)
    alert ('"'+masterPageName+'" is not a valid master...');
    exit(0);
    // Start at the end:
    currentPage = app.activeDocument.pages.length-1;
    while (currentPage >= 0)
    theNewPage = app.activeDocument.pages.add (LocationOptions.AFTER, app.activeDocument.pages[currentPage]);
    theNewPage.appliedMaster = masterPage;
    currentPage--;
    Copy, paste into a plain text editor (InDesign's ESTK is good) and save as "insertBlanksAfterAll.jsx" in your Scripts folder. When saved in the right folder, it will automatically become available in the Scripts Panel.

  • Editable text box on each page, but generated from Master Page?

    I want to create a blank text box that lives on the Master Page so that it shows up on each page in the document, but I then would enter custom text into the field on each page ( or just leave it blank).
    I know, I know, I can do simply copy a text box from one page, and paste in place on all subsequent pages... or set it up once on a page, then just keep duplicating that page... or some other work around. But simple as those work arounds are, I'd just like a blank text box show up automatically on each page as a master page item, then I can enter text as a see fit and not have to do any duplicating tricks. I've looked up a few tutorials, but none solve for my need.
    So I guess the real question is, does InDesign allow the content of a master page text field to be individually edited on the pages of the document itself?

    It's bet to NEVER use the override master page items command since it overrides ALL master items. That's like using a wrecking ball as a flyswatter. And you don't need to put random text in the frame either (especially since you said you don't want to use it on some pages, though it might be best for those if you create another master without the frame). To override any master object hold Cmd (Mac) or Ctrl (Windows) + Shift and click on it with the selection tool.

  • FrameMaker 12 master page footer tab stops

    I'm using FrameMaker 12 for the first time (have used other versions in the past). On the right master page, I hit Tab twice, and inserted two variables into the footer. On the Body pages, the text is cut off on the right. To fix it, I had to delete the center-aligned tab on the master page, leaving only the right aligned tab. That shouldn't have been necessary. Why did the text aligned to the right-align tab stop get cut off?

    What are:
    dimensions & units of the footer frame
    exact values (& units of the tab stops
    Justification of the footer para
    is Columns set to 1 and Room for Side Heads off in the footer para
    font in use (including file type OTF, TTF, PFM)
    I have occasionally seen odd right-tab-to-frame edge behavior in earlier FMs. Frame definitely messes up R tab content if it thinks the tab stop is beyond the frame edge (it won't let you set the tab stop that way, but will let you reduce the frame size later).
    Setting the R tab stop to 0.01 less than frame size usually fixes it. My random conjecture is that it might have something to do with round off of what FM shows in dialogs vs. what it actually stores internally.

  • Outlines in master pages

    Hello everybody, I have found a problem with the ouline function in the indesign server scripting.
    I don't know if this is the correct section or I must use "Indesign scripting"
    Well, I am going to try to explain my problem:
    I have a script to do (between others) the ouline of all the document. My problem appear when I want to do the outline of some content placed and linked in the master.
    For example, the page number is usually place in the master page and is a link added with a "special character".
    The problem is that althought the outline is correctly made, the content of the box is wrong. It is not the page number, but the character 'A' which appears when the special character is added.
    It seems that the problem is that when the system try to do the outline the content of the link is lost.
    One solution would be to take to the front end the box, i.e. quit that box to the master page, but I don't know how can I do that from the script.
    I hope that everything is well explained and someone could help me.
    Regards

    Hi Alice
    My sincere apologies as "life" has gotten a bit in the way of my forum participation. So I offer my apologies in the delay of replying to you.
    In re-thinking this a bit, the question of why you would want a bookmark in a master page to begin with, comes to mind. As bookmarks typically are used to allow linking to a defined spot on the page, my thought is that perhaps you want a "back to top" that could be used? And if so, you are attempting to insert a bookmark named "top" to each of the topics easily?
    If my hunch is correct, you likely are unaware that you even need a bookmark in order to accomplish the goal. If you are trying to provide a link your users may click to reach the top of the page, simply link them to a pound/hash symbol ( # ) and you have accomplished your goal.
    Otherwise, please explain to me what the behavior is you are trying to create so that I might perform some testing to see if it's possible to achieve and how I might explain it.
    Cheers... Rick

  • CS4 InDesign Facing Master to only right Single Master Page

    I have a catalog set up as facing pages. I set up the Master Pages as 2 page Spreads.
    Now, the client wants to make an e-catalog (or pdf) out of it. They want all the pages to have the RIGHT hand master page layout.
    When I change the document set up to non-facing pages, I get only the LEFT master on each page.
    The right Master page is still there, but when I change the master options to one page, I get only LEFT page again.
    The only way around I can see, is to copy the right hand master, delete it, and paste it into a single master page.
    Is there an easier way? Do most people use the left hand page for times like this instead?
    I have several of these to do, so the less time it will take the better.
    Thanks!

    P Spier wrote:
    What Paul said, but watch out for any overridden master items.They'll remain on the pages and the new ones will be behind them.
    and we won't bother mentioning how it's possible to avoid this...
    Harbs

  • Copy/paste testframe from a master page ?

    Hi,
    A layout has been made by a designer. He uses a lot of properties (rotation, odd corner, gradient ...) for each of his elements (textFrame).
    From this layout, I have to create an automatic layout from his work (I'm using InDesign CS5). That mean I should recreate the properties in Javascript for several elements.
    I was wondering if it would be better to use a Master page with all of those elements in it and then using of the "copy/paste" to call my elements.
    According to you, is it a good way to proceed ?
    By the way, I have some problems to select a textframe in my master page...
    Here is what I use to access to my textFrame element :
    myDocument.masterSpreads.item("A-MyName").pages.item(0).textFrames.item("MyBlocName")
    What's wrong ?
    Thank you very much.

    I use the script label to name my textframes.
    I define the names myself in a MasterPage especially reserved to contain those textFrames ready to be copied and pasted, so I suppose there won't be two identical names !
    There's no other way to proceed than with an instruction FOR ?
    Something direct like : myMasterPage.item("MyBlocName").copy()  ?
    (I don't really know how copy/paste function works in Indesign Javascript Scripting...)
    By the way, I tried to use the exemple like this (to see if it works) :
    myMasterPage = myDocument.masterSpreads.item("C-test"); //My Master is called "test" and its letter is "C".
    for(var n=0;n<myMasterPage.allPageItems.length;n++){
        if(myMasterPage.allPageItems[n].constructor.name == "TextFrame" && myMasterPage.allPageItems[n].label == "MyBlocName"){
            myMasterPage.allPageItems[n].contents = "TEST";       
    But nothing happen... (no error).
    A problem with myMesterPage ?
    Thank you very much for your help !

  • Textbox corrupted when dublicating page or using paste in place

    As is visible below some of the text boxes are corrupted, when dublicating page (or using paste in place)
    All settings on the text-boxes remain the same - however, the text is repositioned so that it is no longer inside the text box.

    Very sorry to hear you're encountering some very unusual (and bad) behavior working with Muse. What you're describing doesn't sound like anything I've heard reported before, but it sounds more like a bug than anything you're doing wrong. If it is a bug, it's probably specific to the one composition widget in your file. Could you send us the .muse file so we can take a closer look?
    Please send us the .muse file at [email protected] along with a link to this thread. If the file is larger than 20Mb you can use a service like Adobe SendNow, Dropbox, WeTransfer, etc. (If you use a service, please include your return e-mail address in the body of the message, since not all services include it in the sharing invite they send.) Thanks.

  • Can I specify more than one para tag for master page mapping?

    Hi,
    I want to map the same master page to be used by four different tags. Must I create a new row in the mapping table for each or can I separate the tag names by a comma and a space, for example, "Body, Bullet, Heading1, Note"?
    I tried the latter and expected it to work, but it did not.
    Thanks,
    Sean

    > ... create a new row in the mapping table for each ...
    That works, and has no side effects that I've seen.
    It appears, by the way, that FM applies the MP based on the first para tag found that has a MasterPageMaps table entry, so multiple matches per page, even conflicting, are not a problem, as long as getting the MP for first-found is OK with you.

  • Placement of datamerge boxes and moving master page items

    You helped me with my data merge problem earlier. Now I have successfully brought my excel info into Indesign with datamerge but I can't seem to get the multiple boxes to sit on my page, they are grouped together to the left and down from my page.
    Also I've used master pages to create a header and footer for each page and the left hand page behaves as it should, but the objects on the rh master page appear lower and to the right of where they should be. I've attached a screenshot so you can see what I mean. It's a bit hard to see the rh page header, but it should be similar to the lh page. I'm using CS6.

    After a bunch of trials and errors I think I've done the multiple records correctly. Just had an A4 page with nothing on it except the one text box and with no master pages - I changed to facing pages and did the master pages after I'd done the data merge.
    It seems odd to me that the header and footer on the lh page is correct but not on the rh page when they've been made the same way.
    I've just gone through my whole document and moved all the text boxes to where they should be and if I don't come up with some remedy that's what I'll do with the rh page but I'd really like to solve this mystery as I'm so pleased with the whole data merge system that I'd like it to work 100% properly.
    The overset text is not a problem as I'm going to link my text boxes to deal with text of different lengths and some fields to be deleted. I've done the data merge several times while I worked out the right size for the text box to fit my desired page format.

  • Spell check option to skip master pages

    I'm still running CS3 so perhaps this has already been solved for but I need a spell check option to ignore the master pages. I'm a magazine designer and our master pages contain placeholder text so we can work our layouts before we have final copy. Problem is we can never run an effective spell check because there is no option to ignore the master pages so a spell check tries to check the lorum ipsum text rendering it useless. It would be wildy helpful if in the search dropdown option you could select "no masters" or something of the sort. Similar to the option in the Find/Change search dropdown, where you can choose "story" instead of "document"; in fact, this same functionality in Find/Change would be great as well. Also, "Story" is a good option, the whole document minus the master pages would be even better. That way we could check all of the active text in the document, including folios, rubrics and captions that are divided from the story.
    Let me know if I can explain this better.

    Spring Step Creative wrote:
    Peter,
    I'm familiar with the workaround. Trouble is when you place or paste 
    your text in later, you have to remember to take it off of "no 
    language" or it will continue to ignore the text. We're dealing with 
    editors here, with very quick turnarounds, and the whole idea is not 
    to make a mistake. Just think how easy it would be to forget to turn 
    off "no language", run a spell check and think you're good to go to 
    press. ... and don't say InCopy has the solution, because its not a 
    useful product for us; it's cumbersome and doesn't serve us well at 
    all. I really think adding functionality that would allow you to 
    simply filter out the master pages in a spell check would be an 
    excellent help.
    Have you tried creating customized placeholder text, something like "Replace this placeholder text with real text and tag the replacement text with such-and-such paragraph style." instead of lorem ipsum? You do this by creating a text file named "placeholder.txt" that contains your customized text, and saving it in the main InDesign directory. When you perform Type > Fill With Placeholder Text, the customized text appears with instructions.
    You can create object styles for the placeholder text frames that apply the no-language paragraph style. You can make the no-language paragraph style a color, bold, etc, to call even more attention to it.
    A simpler option would be to assure that all the text in your customized placeholder.text file is spelled correctly, so it doesn't get a hit when spell checking.
    Being able to omit Master pages from spell checks is a good idea. Would you want it to be a scope option in the spell checker, or a property of a master page? If it were a master page property, you could specify which master pages are skipped. You can enter a formal feature request at
    https://www.adobe.com/cfusion/mmform/index.cfm?name=wishform.
    HTH
    Regards,
    Peter
    Peter Gold
    KnowHow ProServices

  • Displaying user selection from drop down list in static text on master page

    Hello,
    I am using LC 7.0 at workk and I have hit a road block.
    I have a drop down list at the top of the form. Once the user makes a selection, I want to take that value and paste it in static text located on the master page. I can't seem to get it to work.
    Please help!!!

    Hi,
    Place the Drop Down list on form
    Place text object(s) on master page
    here is the script to display the value and/or text of drop down
    Script will be on Drop Down list events
    Calculate event to display value of DD - FormCalc
    form1.pageSet.Page1.StaticText1.rawValue = this.rawValue;
    Change event to display Text of DD - JavaScript
    form1.pageSet.Page1.StaticText2.rawValue = xfa.event.newText;
    SAVE the form as dynamic pdf.
    Hope this will help.
    Thanks,
    Raghu.

Maybe you are looking for