+ Reply to Thread
Results 1 to 7 of 7

word VBA Select specific page of specific Section

  1. #1
    Registered User
    Join Date
    11-21-2016
    Location
    Egypt
    MS-Off Ver
    2010
    Posts
    5

    word VBA Select specific page of specific Section

    Hi

    I use p1s11,s9,s12 in blow code to print page 1 of section 11 and section 9 (entirely) and section 12 (entirely)

    Please Login or Register  to view this content.
    now I want to select page 1 of section 11 and section 9 and section 12

    I searched a lot and I get the below for single selection

    Please Login or Register  to view this content.
    but it selects the entire section

    also, I found the below for multiple selection

    Please Login or Register  to view this content.
    but it selects sequential sections only (entirely)

    I want to select page 1 of section 11 and section 9 (entirely) and section 12 (entirely)

    in not sequential sections

    how to do this

  2. #2
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: word VBA Select specific page of specific Section

    Cross-posted at: https://stackoverflow.com/questions/...ecific-section
    Please read Excel Forum's Cross-Posting policy in rule 8: http://www.excelforum.com/forum-rule...rum-rules.html
    Cheers,
    Paul Edstein
    [Fmr MS MVP - Word]

  3. #3
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: word VBA Select specific page of specific Section

    You could, of course, use:
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    11-21-2016
    Location
    Egypt
    MS-Off Ver
    2010
    Posts
    5

    Re: word VBA Select specific page of specific Section

    Quote Originally Posted by macropod View Post
    Cross-posted at:
    Please read Excel Forum's Cross-Posting policy in rule 8:
    I didn't know about it so I'm very sorry


    Quote Originally Posted by macropod View Post
    You could, of course, use:
    Please Login or Register  to view this content.
    that's not what I want
    this code is for printing
    I want to select certain pages based on the section number

  5. #5
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: word VBA Select specific page of specific Section

    So why did you post code for printing.

    As for selecting discontiguous ranges, you can't do that with VBA - just as you were told in the cross-post. Moreover, it is rare that one needs to select anything with VBA...

  6. #6
    Registered User
    Join Date
    11-21-2016
    Location
    Egypt
    MS-Off Ver
    2010
    Posts
    5
    Quote Originally Posted by macropod View Post
    So why did you post code for printing.

    As for selecting discontiguous ranges, you can't do that with VBA - just as you were told in the cross-post. Moreover, it is rare that one needs to select anything with VBA...
    i posted the code to get somthing like this "p1s11,s9,s12" in selecting

  7. #7
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: word VBA Select specific page of specific Section

    That code does not select anything; it simply tells Word what ranges to act on and in what order.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Select range page & save under specific folder
    By Cindy9 in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 06-15-2016, 10:55 AM
  2. Linking Excel cell to specific section in Word using macro
    By TEngineer1 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-07-2015, 11:30 AM
  3. Page Break Preview with specific word
    By melleniam in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-25-2014, 06:00 AM
  4. Entering a specific number to effect the number section on another page..
    By KaylaMarie1234 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-13-2014, 05:28 PM
  5. Replies: 3
    Last Post: 01-09-2014, 05:28 PM
  6. [SOLVED] Having difficultly moving a section from page 3 to page 2 in a word document form
    By UNAB in forum Word Formatting & General
    Replies: 2
    Last Post: 03-25-2013, 07:52 AM
  7. Extract specific row from specific section in an excel file
    By yodha in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-06-2009, 01:27 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1