Copy/paste testframe from a master page ?

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 :
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] == "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 !

Similar Messages

  • Copy and paste Values from Numbers to Pages

    When I do simple copy and paste content from Numbers to Pages, I get a formula error message. All I want to copy and paste the values only, not the formulas, but on pages I cannot find a way to paste values only. When it tries to paste formula, it errors because some of the formulas references to other sheets on Numbers. What is the easy way to get values from Numbers tables to pages without passing formulas.
    Or better yet! Is there a way to link tables to pages like charts with refresh capabilities so I don't have to copy and paste values to pages document every time Numbers table values changes?

    There is no Paste Special in OSX, anywhere. You can Paste Values from the Edit menu in Numbers when that would be necessary.
    In such cases where you would use Paste Values in Numbers, you can use Paste and Match Style in Pages for the same result.
    Sometimes it's so obvious to Pages what should be done that it will give you what you need automatically, but sometimes you need to use Paste and Match Style to get the values rather than an error triangle.

  • When I copy say something from a web page how then can I paste it and where to ie pages/messages etc on my ipad

    when I copy say something from a web page how then can I paste it and where to ie pages/messages etc on my ipad

    You can paste it into any word processing program you have, evernotes as stated, the notes app, even into e-mail if you want.

  • How can i paste text from Numbers too Pages without getting the box/frames?

    I have a big list in numbers with a lot of text in each line. I need to copy/paste it in to a pages document but i don't want the frames to come along.

    Hi Carl,
    Pasting from a Numbers table into Pages will paste a table (frames). There is no "Convert Table to Text" command in Pages 5.
    Paste into TextEdit. That will strip all formatting (including the table) and leave plain text. If your Numbers table had more than one column, the text will become Tab-Delimited. Before you paste into TextEdit, make sure the blank document is plain text (if you see Make Rich Text under the Format menu, you have a plain text document).
    Select All, Copy, then Paste into Pages.

  • I need to type in or copy/paste words from other languages (cyrillic for example) but when I do it the only thing I get is a "????????" instead of the word I want to type or insert. What should I do?

    That happens when I don't know how to write so I copy/paste words from other languages, it also happens when I copy words in other languages written in a Word document, and then paste it on a website using Mozilla. This doesn't happen when I use Internet Explorer.

    Well you second post was the correct question because I was going to say you got a second hand macbook pro, didn't change anything, and expected mail to work with your ISP.  The mail settings were thus those of the previous owner.  So you are correct to ask what your ISP's settings should be.
    Unfortunately I can't answer that.  You have to get that from your ISP.  They proably have a web page for it.
    You need to know:
    Incoming mail server (pop)
    Incoming mail server login name
    Incoming mail server password
    POP port
    Does is require SSL?
    Authentication for using POP server (probably password)
    Outgoing mail server (SMTP)
    Outgoing mail server login name (probably same as incoming)
    Outgoing mail server password (probably same sas incoming)
    SMTP port
    Does is require SSL?

  • Can you copy/paste files from the Finder to Mail in Lion, or drag them onto the Mail icon in the Dock to create a new message and attach the files to it?

    Message title says it: Can you copy/paste files from the Finder to Mail in Lion, or drag them onto the Mail icon in the Dock to create a new message and attach the files to it?
    I can't find anything in the Knowledge Base that says these two options no longer work or still do.
    I do not have a system capable of running Lion, but I need to know the answer nonetheless.

    Gee, I don't know: "paste attachments mail Lion"? ;-)
    One further question, if I may: in Panther (which is where I've aggregated nearly 7 years of mail), if you copy more than one file in the Finder, switch to Mail, and paste the files into a new message, only the file names paste in. If you copy one file and paste it into a Mail message, you get the file, not just the name. Is that still true, or has that (IMHO) bug been fixed since 10.3.9?

  • How to copy-paste frames from one document to other with there respective layers intact?

    Hi All,
         I am facing an issue while copy paste frames from one document to other. I have a 3 frames in first documents each one on different layer. First document has 3 layers. The second document too have 3 layers , I am copying frames from first document to scrapdata using 'ICopyCmdData ' and 'kCopyCmdBoss'. I have 'Paste Remembers Layers' menu 'Checked' on Layer panel. I am using following function to copy frames to scrapdata.
    bool16 copyStencilsFromTheTemplateDocumentIntoScrapData(PMString & templateFilePath)
         bool16 result = kFalse;
            SDKLayoutHelper sdklhelp;
            PMString filePathItemsToBeCopiedFrom(templateFilePath);  //("c:\\test\\aa.indt");
            IDFile templateIDFile(filePathItemsToBeCopiedFrom);
            UIDRef templateDocUIDRef = sdklhelp.OpenDocument(templateIDFile);
            if(templateDocUIDRef == UIDRef ::gNull)                 
            ErrorCode err = sdklhelp.OpenLayoutWindow(templateDocUIDRef);
            if(err == kFailure)                 
            InterfacePtr<IDocument> templatedoc(templateDocUIDRef,UseDefaultIID());
            if(templatedoc == nil)               
            if(templateSpreadUIDList == nil)                  
            IDataBase * templateDocDatabase = templateDocUIDRef.GetDataBase();
            if(templateDocDatabase == nil)                  
            UIDRef templateDocFirstSpreadUIDRef(templateDocDatabase, templateSpreadUIDList->GetNthSpreadUID(0));
            InterfacePtr<ISpread> templateSpread(templateDocFirstSpreadUIDRef, IID_ISPREAD);
            if(templateSpread == nil)                 
            UIDList templateFrameUIDList(templateDocDatabase);
            if(templateSpread->GetNthPageUID(0)== kInvalidUID)                  
            InterfacePtr<ICommand> copyStencilsCMD(CmdUtils::CreateCommand(kCopyCmdBoss));
            if(copyStencilsCMD == nil)                
            InterfacePtr<ICopyCmdData> cmdData(copyStencilsCMD, IID_ICOPYCMDDATA);
            if(cmdData == nil)                 
            // Copy cmd will own this list
            UIDList* listCopy = new UIDList(templateFrameUIDList);
            InterfacePtr<IClipboardController> clipboardController(gSession,UseDefaultIID());
            if(clipboardController == nil)              
            ErrorCode status = clipboardController->PrepareForCopy();
            if(status == kFailure)                  
            InterfacePtr<IDataExchangeHandler> scrapHandler(clipboardController->QueryHandler(kPageItemFlavor));
            if(scrapHandler == nil)                 
            InterfacePtr<IPageItemScrapData> scrapData(scrapHandler, UseDefaultIID());
            if(scrapData== nil)                
            UIDRef parent = scrapData->GetRootNode();
            cmdData->Set(copyStencilsCMD, listCopy, parent, scrapHandler);
            if(templateFrameUIDList.Length() == 0)       
                return kFalse;      
                status = CmdUtils::ProcessCommand(copyStencilsCMD);    
            if(status != kFailure)
              result = kTrue;
            sdklhelp.CloseDocument(templateDocUIDRef,kFalse,K2::kSuppressUI, kFalse);
        return result;
    After this I need to close first document. Now I am opening the second document from indt file which has same number of layers as first document. I am trying to paste frames from scrap data to second document using '' 'ICopyCmdData ' and 'kPasteCmdBoss' as shown in follwoing function
    bool16 pasteTheItemsFromScrapDataOntoOpenDocument(UIDRef &documentDocUIDRef )
        bool16 result = kFalse;
               InterfacePtr<IClipboardController> clipboardController(gSession,UseDefaultIID());
                if(clipboardController == nil)
               InterfacePtr<IDataExchangeHandler> scrapHandler(clipboardController->QueryHandler(kPageItemFlavor));
               if(scrapHandler == nil)               
               InterfacePtr<IPageItemScrapData> scrapData(scrapHandler, UseDefaultIID());
                if(scrapData == nil)
                     //This will give the list of items present on the scrap
                UIDList* scrapContents = scrapData->CreateUIDList();
                if (scrapContents->Length() >= 1)
                    InterfacePtr<IDocument> dataToBeSprayedDocument(documentDocUIDRef,UseDefaultIID());
                    if(dataToBeSprayedDocument == nil)
                    InterfacePtr<ISpreadList>dataToBeSprayedDocumentSpreadList(dataToBeSprayedDocument,UseDef aultIID());
                    if(dataToBeSprayedDocumentSpreadList == nil)
                    IDataBase * dataToBeSprayedDocDatabase = documentDocUIDRef.GetDataBase();
                    if(dataToBeSprayedDocDatabase == nil)
                    UIDRef spreadUIDRef(dataToBeSprayedDocDatabase, dataToBeSprayedDocumentSpreadList->GetNthSpreadUID(0));               
                    SDKLayoutHelper sdklhelp;
                    UIDRef parentLayerUIDRef = sdklhelp.GetSpreadLayerRef(spreadUIDRef);
                    InterfacePtr<IPageItemScrapData> localScrapData(scrapHandler, UseDefaultIID());
                    if(localScrapData == nil)
                    if(parentLayerUIDRef.GetUID() == kInvalidUID)
                    InterfacePtr<ICommand> pasteToClipBoardCMD (CmdUtils::CreateCommand(kPasteCmdBoss));
                    if(pasteToClipBoardCMD == nil)
                    InterfacePtr<ICopyCmdData> cmdData(pasteToClipBoardCMD, UseDefaultIID());
                    if(cmdData == nil)
                    if(scrapContents == nil)
                    PMPoint offset(0.0, 0.0);
                    cmdData->Set(pasteToClipBoardCMD, scrapContents, parentLayerUIDRef );
                    ErrorCode status = CmdUtils::ProcessCommand(pasteToClipBoardCMD);
                    if(status == kSuccess)
                        CA("result = kTrue");
                        result = kTrue;
                }//end if (scrapContents->Length() >= 1)       
        return result;
         Here in above function its required to set Parent Layer UIDRef and because of this all frames are getting paste in one layer.
    Is there any way we can paste frame in there respective layers?
         Also I need to work this code with CS4 server and desktop indesign.
    Thanks in advance,
    Rahul Dalvi

    // dstDoc must be FrontDocument
    InterfacePtr<ILayoutControlData> layoutData(Utils<ILayoutUIUtils>()->QueryFrontLayoutData());
    InterfacePtr<ICommand> createMasterFromMasterCmd(CmdUtils::CreateCommand(kCreateMasterFromMasterCmdBoss));
    InterfacePtr<ILayoutCmdData> layoutCmdData(createMasterFromMasterCmd, UseDefaultIID());
    layoutCmdData->Set(::GetUIDRef(layoutData->GetDocument()), layoutData);

  • Can't copy-paste images from Noteshelf in iOS6

    I use an app called Noteshelf (v7.0). In iOS5, I was able to copy-paste pictures from Noteshelf into other apps, such as Keynote (v1.7.1) or in an email. However, since I upgraded to iOS6, this doesn't work anymore. As the versions of Noteshelf and Keynote are the same, the logical conclusion is that something has changed in the copy-paste functionality of iOS6. Can somebody tell me about this and, better still, give me a fix for it?

    Tell us how you are doing your copy and paste

  • Copy Paste only from Paint

     We have a w2008 R2 terminal server for a week now and clients make a vpn connection. They copy paste pictures from local to a Word 2010 document on the terminal server.
    Everthing function well before. Same clients and a w2003 terminal server with Word 2010. Users copy local picture (openend in Paint, Microsoft Photo viewer, Irfanview, etc.) and than copy paste it to a Word document on the terminal server.
    Now it does not work anymore accept when they opend it local in Paint. Only than they can copy the picture.  
    -I have checkt de properties on client
    -I have restart rdpclip.exe on Termnal server.
    -I have checked if it is a rights issue but it seems that it's not
    I realy like to find a solution for this because doing it with MSPaint is al lot of work for the people. 
    Does any has a answer for this?
    Your help will be appreciated.

    This one may help.
    copy-and-paste not working
    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]
    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

  • Windows 8 how to bring up copy/paste option from touch screen

    How do you bring up Copy/Paste option from touch screen?

    Adobe Reader Touch supports copying text only (not images).
    Tap on text and move "grabbers" to adjust text selection (Touch) or select text with a mouse.
    Press and hold (Touch) or right-click with a mouse to bring up the context menu.
    Select Copy from the context menu.
    You can paste the copied text to an existing sticky note or text field in Adobe Reader Touch or to other application such as Microsoft Word or Notepad.

  • Can't shown chinese text when copy & paste data from server to Outlook, Word & notepad, etc.( Office 2013)

    Can't shown chinese text when copy & paste data from server to Outlook, Word & notepad, etc.( Office 2013)

    As per the information and details provided by you, when you copy & paste a data from server to Outlook, word, notepad, then you do not receive the Chinese text.
    For Outlook, please follow these steps: -
    Close and reopen Outlook in your western locale (or switch the windows system to your Western locale if you changed that),
    Manually change the message from Western to Chinese encoding, which you can do in all versions up to Outlook 2007.
    If you want to stay in your Chinese locale in Outlook 2007, then:
    After you hit reply, go to the Option tab > More Options.
    In the Encoding drop-down menu, select the Chinese encoding you are working in (Not the encoding used by the person who will receive the message)
    To set the Chinese locale in all versions up to 2007 the controls are under.
    Tools > Options. In Outlook 2010 File tab > Options > Advanced > International options.
    Unicode (UTF-8)
    is a good setting for multilingual users.
    Check the
    Auto select 2007)/ Automatically select (2010) encoding box.
    I hope this information will be helpful for you.
    Thanks and regards
    [email protected] 

  • How can I copy/paste text from one page to another?

    I feel like I am taking crazy pills... is there really no way to copy a text box (or group) from one page to another while creating books in Aperture 3?  Lets say I have my entire book laid out and I want to add one paragraph at the end on one page which will push text and photos down a half page or so... in most programs for the last decade or so they added really cool functionality... cut/paste...  It seems like the apple developers are aware of it because they are in the context menus but they don't work on text, only photo boxes.  Additionally, you can copy/paste text but it erases all formatting.
    Seriously, am I missing something?  I have trouble believing that they can't include this function.
    Anyone else have this issue?

    Update... it seems to only happen with text boxes which I create.  So when I try an existing theme I can cut/copy/paste just fine, but in that same theme if you edit the layout and add a new text box, I can't copy paste it anywhere... the options are in the menu but nothing happens.
    Thoughts? Solutions?
    I am running 3.4.3 on a MacBook Pro OS X 10.8.3

  • Bullets which include links will prevent correct copy/paste content from word document to wiki page.

    I have a word document around 20 pages which contains the following sentence (a bullet with two links):-
    Now if I remove this sentence then copy/paste the 20 pages from word to wiki page they will be pasted correctly inside the wiki page , where all the pages, bullets, etc will be mapped correctly inside the wiki page as HTML tables, bullets ,etc.
    But the problem if I kept the above sentence then the whole 20 pages will be pasted as plain text inside the wiki page.
    So can anyone advice on this ?and how I can overcome it ?

    Hi John,
    You can try this (1) Save as Word Doc as single file web page (2) Open that file in normal text editor(notepad or so) and copy all (3) Goto Wiki page edit source and paste all (4) Save it
    Let us know how it goes.
    please 'Propose as answer' if it help you, also de-mark it if it didn't. Thank you!
    the result will be as follow, not sure if this is a valid approach can you adivce ?:-

  • Adding multiple images to site and how to avoid copying/pasting identical text on different pages

    Hi guys, I've been using DW up till now and have been recommended to try Muse.
    A couple of questions that I have been unable to answer by searching ...
    1) I want to transfer all images from my old DW site but can't find a way to add these to the new site's assets. Can I only add images manually to a page for them to appear under assets?
    2) In DW I used iframes to have the same text appear on different parts of a site. This means that when text about a product changes, it updates in every instance rather than me having to copy and paste into the different instances. Is an iframe the best process in Muse or is there a better way?
    Thanks in advance for advice,

    Hi Jo,
    You can't add the images directly to the assets folder directly. You need to add the images to the pages for them to appear under assets.
    For updating text in every instance, the best way to do so in Muse is to place the text on a Master page and apply it to all the desired child pages. So all you would needed to do is to update the text on the master page and it will updated on all the associated child pages.
    Hope this helps!

  • Copy/paste Footnotes from Word

    I am writing my thesis and want to format in Pages. I did most of my work on Word, but it does not format pictures nearly as well. I copy-pasted my essay to Pages, but the new program does not recognizemy footnotes. Any help or suggestions?

    Pages divorces foot notes from what it classifies as body text. If the footnotes are not preserved in the Pages body text, you will have to perform insert footnote to in the corresponding location of the original Word text.
    Select the actual footnote text in word, copy, and in Pages, single click the corresponding footnote text area at the bottom of the Pages document. This will display as a box around the footnote text area. Double-click in this specific footnote text area, and then paste the content from the Word footnote text.

Maybe you are looking for

  • Creative Labs Zen Sl

    Is it wise for me, (I li've in Australia), to purchase an as yet unreleased Zen Sleek. In theory it should be okay, but you can never be sure. Windows operating systems and USB connections are uni'versal, but if the Zen sleek requires some sort of ou

  • Printing of mainwindow after the secondary windows in the First Page

    Dear All, I have a requirement where i have to print the 4 secondary windows in the first half of a page and main window should start from the second half of the first page page.In main window i have used a template according to the cleunts requireme

  • I cannot print on the VM part (W7) though the printer was successfully installed

    I tried to add a local USB printer fro the W7 VM part. Installatioin work well, but the printer is not printing

  • [SOLVED] Netbooting with PXE, TFTP and NFS / Numerous errors

    Greetings all, hope you can help me out. Been given a task by my company of making a network bootable ICA client (with X and Firefox, with the Citrix ICA client installed) as small as possible to minimize network traffic (as 440 workstations would be


    Ikeep getting a call from the above mentioned name ive blocked them 5 times now but they still keep ringing me i thought this was a dodgy name thats why i blocked them is this right anyone else had any problems many thanks