Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4604956
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T00:22:00+00:00 2026-05-22T00:22:00+00:00

I have 2 documents. I want the header of first doc to be copied

  • 0

I have 2 documents. I want the header of first doc to be copied to the second doc (exactly, same formatting, page number options etc..). Here’s my source code so far:

tell application "Microsoft Word"
    activate
    open "Macintosh HD:test.docx"
    open "Macintosh HD:newtest.docx"
    set doc to document "Macintosh HD:test.docx"
    set doc2 to document "Macintosh HD:newtest.docx"

    set refHeader to get header of section 1 of doc index header footer primary

end tell

how can I set refHeader to the header of doc2?
Thanks.

I tried this but it doesn’t work, gives me error:

set refHeader to page number options of (get header of section 1 of doc index header footer primary)
    set page number options of (get header of section 1 of doc2 index header footer primary) to refHeader
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T00:22:01+00:00Added an answer on May 22, 2026 at 12:22 am

    this seems pretty elaborate but does the job might be a better way but i”m not sure

    tell application "Microsoft Word"
        activate
        open "Macintosh HD:test.docx"
        open "Macintosh HD:newtest.docx"
        set doc to document "Macintosh HD:test.docx"
        set doc2 to document "Macintosh HD:newtest.docx"
    
        set refHeader to content of text object of (get header of section 1 of doc index header footer primary)
        set props to properties of text object of (get header of section 1 of doc index header footer primary)
        set content of text object of (get header of section 1 of doc2 index header footer primary) to refHeader
        set properties of text object of (get header of section 1 of doc2 index header footer primary) to props
    end tell
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have 2 entities Documents(Id,Number,Content,Date_Added) and Adocuments(archives of documents)(Ida,Number,Content,Date_Added) and I want to move
I have a large number of documents (mainly PDFs) that I want to index
I have a number of documents stored in Solr cluster, and want to get
I have n documents and want to find common words that are included in
I want to have a custom control that works on whatever documents I decide
I have multiple document.ready functions on a page and I want a function to
I have 2 pages with different id in the container page. first page have
I want to personalize the header group for a list. First of all I
I have a website where I want the following page to function - it
I have a document that I want to be flipped / rotated 180 degrees

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.