+ Reply to Thread
Results 1 to 21 of 21

Problem inserting pagebreak

  1. #1
    Registered User
    Join Date
    04-23-2015
    Location
    india
    MS-Off Ver
    2010
    Posts
    18

    Exclamation Problem inserting pagebreak

    I am exporting/pasting data from excel to word. Now i need to inset pagebreak so that the next para come on a new page. However nothing seems to be working. Please help.

    Current code portion:
    Please Login or Register  to view this content.
    Last edited by arian29; 06-30-2015 at 07:50 AM.

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Problem inserting pagebreak

    Where's the code you tried for inserting a page break?

    I would have expected to see something that used the InsertBreak method.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    04-23-2015
    Location
    india
    MS-Off Ver
    2010
    Posts
    18

    Re: Problem inserting pagebreak

    I tried using - myDoc.Paragraphs(1).Range.Find.Execute findtext:="TABLE 1: SCOPE OF SUPPLY"
    But it didnt work. I was getting a pagebreak but on top of the pasted para and not after it.

    So i found this page - https://msdn.microsoft.com/en-us/lib...ffice.11).aspx

    Complete code i am working on ::
    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    04-23-2015
    Location
    india
    MS-Off Ver
    2010
    Posts
    18

    Re: Problem inserting pagebreak

    Help!............................

  5. #5
    Registered User
    Join Date
    04-23-2015
    Location
    india
    MS-Off Ver
    2010
    Posts
    18

    Re: Problem inserting pagebreak

    bump!...............................

  6. #6
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Problem inserting pagebreak

    Can you upload a sample workbook?

    Also, can you explain exactly where you want page breaks?

  7. #7
    Registered User
    Join Date
    04-23-2015
    Location
    india
    MS-Off Ver
    2010
    Posts
    18

    Re: Problem inserting pagebreak

    Need the pagebreak after a table is pasted.
    If you see.. code pastes table 4 then 3 then 2 then 1 so 1 come on page 1 then followed by rest of the tables. So i need table1 pasted then a pagebreak so that table 2 is pasted on the next page.

  8. #8
    Registered User
    Join Date
    04-23-2015
    Location
    india
    MS-Off Ver
    2010
    Posts
    18

    Re: Problem inserting pagebreak

    I was trying to control the cursor or use methods to search specific strings in the file and put a page break there ' all commented items'.. wasn't successful though
    Last edited by arian29; 07-02-2015 at 08:28 AM.

  9. #9
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Problem inserting pagebreak

    Why are you pasting in that order if that's not the order you want the tables to appear in the Word document?

  10. #10
    Registered User
    Join Date
    04-23-2015
    Location
    india
    MS-Off Ver
    2010
    Posts
    18

    Re: Problem inserting pagebreak

    If i paste in the order, 1 2 3 4 it is pasted incorrectly. It pastes then pushes the old table down so table 1 will end up at the last page instead of the first.

  11. #11
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Problem inserting pagebreak

    It should be straightforward to paste table1, insert a page break, then paste table2 after the page break, insert another page break, insert table3 after the page break etc.

    You should just need to change this so that it pastes at the end of the document instead of the start.

    Please Login or Register  to view this content.

  12. #12
    Registered User
    Join Date
    04-23-2015
    Location
    india
    MS-Off Ver
    2010
    Posts
    18

    Re: Problem inserting pagebreak

    Change to what ? I am stuck.. Nothing seems to work..

  13. #13
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Problem inserting pagebreak

    Any chance you could upload a sample workbook?

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

  14. #14
    Registered User
    Join Date
    04-23-2015
    Location
    india
    MS-Off Ver
    2010
    Posts
    18

    Re: Problem inserting pagebreak

    Won't be possible to upload all.. as data is critical..

  15. #15
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Problem inserting pagebreak

    Don't need real data.

  16. #16
    Registered User
    Join Date
    04-23-2015
    Location
    india
    MS-Off Ver
    2010
    Posts
    18

    Re: Problem inserting pagebreak

    It wont be possible. Its a big dashboard with lots of data and modules. This is just the part where we print. i remove any data or module it gives a random error. N i dont wanna create errors n debug them for this.. hope you understand.

  17. #17
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Problem inserting pagebreak

    You can't just mock up an Excel workbook with some sample, dummy data?

  18. #18
    Registered User
    Join Date
    04-23-2015
    Location
    india
    MS-Off Ver
    2010
    Posts
    18

    Re: Problem inserting pagebreak

    Hi, Ok i have attached the file. All codes are deleted and data removed/changes. To test please go to Sheet3 (Table2) and press the Test button. If the sheets are hidden you would have to unhide them manually.
    Attached Files Attached Files

  19. #19
    Registered User
    Join Date
    04-23-2015
    Location
    india
    MS-Off Ver
    2010
    Posts
    18

    Re: Problem inserting pagebreak

    Hello.. anything.. ?

  20. #20
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Problem inserting pagebreak

    arian29

    No.

  21. #21
    Registered User
    Join Date
    04-23-2015
    Location
    india
    MS-Off Ver
    2010
    Posts
    18

    Re: Problem inserting pagebreak

    bump!............................

+ 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. Inserting Pagebreak
    By jp16 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-15-2012, 04:11 AM
  2. [SOLVED] Pagebreak and Zoom problem
    By JON JON in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-13-2006, 07:50 AM
  3. Excel 2000 PageBreak problem
    By PhilC in forum Excel General
    Replies: 1
    Last Post: 04-28-2006, 07:27 AM
  4. PageBreak problem. How to improve performance?
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-22-2005, 09:05 PM
  5. Pagebreak function problem
    By quartz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-09-2005, 07:05 PM

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