• Copy entire template

    • This topic has 8 replies, 5 voices, and was last updated 12 years ago.
    Author
    Topic
    #488753

    I have a situation whereby I want to copy the contents of a template to a new file – including all the page setup details so that I get the change in margin settings that are on the template.

    Ideally if anyone is aware of a way that I would be able to, from a blank document, select a template to copy, copy the entire contents (text, layout and page settings) and then paste the contents to the new doc 😉

    Thanks

    Alba

    Viewing 6 reply threads
    Author
    Replies
    • #1387301

      Can you explain why you don’t just use the template? What is in the new document that precludes using the template to create the doc?

    • #1387889

      Thanks Andrew,

      I know it sounds stupid, however, we work with a Document Management System, that are trying to integrate it with a Digital Dictation System. One of the features of the integration between the two products is that a user can generate a document within the Document Management System from the Dictation making the process seamless for the both the person dictating and the person transcribing. We are able to link Templates to the dictations, but unfortunately we have multiple templates that can be used in each situation and the dictation product only allows a 1-1 setup.

      Therefore I was hoping that if a user could create a document with the Normal template, then run a macro to select the required template and bring over the template and the page settings. I have the code to select the template, but what I lack is the ability to copy the page layout..

      Thanks

      However, we have a number of templates (letter primarily) that are are designed with a specific page layout

    • #1387906

      I would be inclined to copy the new doc content across to the specific template (taking care that the pasted content doesn’t include a section break.

      However, page setups and header/footer info is contained in a section break so you could leverage this for an alternate method of doing this. Perhaps you could save a continuous section break for each required “page layout” and simply add the relevant one to the back of the document. This assumes the styles across all ‘templates’ are the same.

    • #1387907

      I’m still not sure what you mean by page setup. Do you need to capture the margins, headers & footers, and such? Or just the layout of the text and other elements within margins?

    • #1387922

      By Page setup I am primarily referring to the margins. Our letter template has different margin sizes to Normal, so that when printed it will fit onto the pre-printed paper. When I copy the entire contents of the template, the layout comes over fine, but on pasting to normal, it loses the margin settings.

      Hope this makes sense..

      Alba

    • #1387931

      So far for me today, as long as the new document is empty, when I press Ctrl+a (to select everything, including the final paragraph mark), margins and header/footer also get pasted into the new document. If there’s even a single character added to the document, only the text gets pasted. What I describe is what happens manually. Perhaps VBA could somehow insure that page properties from the template (which in this case is only a source document for the copy) also get copied/applied.

    • #1387973

      So why don’t you just make a copy of the template as a file, rather than trying to open and replicate its contents? The former is dead easy; the latter requires an intimate knowledge of everything in the template – including vba projects, customised building blocks, etc, not just page layouts – they’re the ‘easy’ part.

      Cheers,
      Paul Edstein
      [Fmr MS MVP - Word]

      • #1388388

        If I were designing a solution to this problem I would do as Andrew suggested – move the text into the template. Trying to create a macro to reproduce the margins and other page settings is complex and runs a high risk of missing some of the settings.

        Instead, you could create a macro that selects all, copies the selected text, then selects a template, creates a new document based on that template, and pastes the copied text. That way you don’t risk losing any of your template settings.

        Would that work in your situation?

    Viewing 6 reply threads
    Reply To: Copy entire template

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: