none
Save the WORD printed content into another WORD when printing the WORD document RRS feed

  • Question

  • Hi Developers:

    Here is a problem about printing the WORD document.

    Here is the requirement:

    When I click the Print button within the WORD document, I want to save the printed content into another WORD document.

    About the printed content, such as if I select Page NO.10, it would print only the NO.10 page content and save the NO.10 page content into another WORD document. If I select Page NO. from 3~5, it would print the content of Page NO. from 3~5 and also save the content of Page NO. from 3~5 into another WORD document.

    Is this possible to implemented?

    Thanks

    Wednesday, April 29, 2015 4:53 AM

Answers

  • Hi Paul_PMA,

    The build in print feature doesn't provide the function print selected page. However we can create a repurpose commands on the Office fluent ribbon.

    Then we can get the start/end page number of selected pages via code below:

    'print start page
    Debug.Print Selection.Range.Characters(1).Information(wdActiveEndPageNumber)
    
    'print end page
    Debug.Print Selection.Information(wdActiveEndAdjustedPageNumber)
    

    Next, we can use Document.PrintOut method to print the specific pages via assign pages parameter. At last, we can use selection.Copy to copy the content to another document.

    And here is an helpful article about repurpose command for your reference:

    Temporarily Repurpose Commands on the Office Fluent Ribbon

    Regards & Fei


    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.

    Thursday, April 30, 2015 5:21 AM
    Moderator

All replies

  • If you print the original word, print selected page can work. Just see this article.

    But I have another idea, why not save first then print the new whole word file? The content is the same and you don't need to print the selected pages,just print the new whole word.

    Wednesday, April 29, 2015 8:59 AM
  • Hi Paul_PMA,

    The build in print feature doesn't provide the function print selected page. However we can create a repurpose commands on the Office fluent ribbon.

    Then we can get the start/end page number of selected pages via code below:

    'print start page
    Debug.Print Selection.Range.Characters(1).Information(wdActiveEndPageNumber)
    
    'print end page
    Debug.Print Selection.Information(wdActiveEndAdjustedPageNumber)
    

    Next, we can use Document.PrintOut method to print the specific pages via assign pages parameter. At last, we can use selection.Copy to copy the content to another document.

    And here is an helpful article about repurpose command for your reference:

    Temporarily Repurpose Commands on the Office Fluent Ribbon

    Regards & Fei


    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.

    Thursday, April 30, 2015 5:21 AM
    Moderator