Microsoft Office Forums Significant Blank Space At Top Of Page When Records Merged 1 Per Page

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #16  
Old 05-03-2017, 04:58 PM
macropod's Avatar
macropod macropod is offline Significant Blank Space At Top Of Page When Records Merged 1 Per Page Windows 7 64bit Significant Blank Space At Top Of Page When Records Merged 1 Per Page Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 19,533
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default


Quote:
Originally Posted by JennEx View Post
Quote:
Originally Posted by macropod View Post
... is that your macro seems to be running the merge from a different workbook than the one containing the data source.
Correct ... my 'application' workbook holds the code. It relies on a workbook serving as a database as each date has it's own. The application can call on any date to pull reports from.
Quote:
Originally Posted by macropod View Post
Furthermore, it closes the mailmerge source workbook if it's open.
I did not know that. When I go to my application worksheet, I can access the data workbook ... but ... it's hidden. If I unhide it, I have access to it as it is open. (?) Could the fact the data workbook is hidden play a role?
The code that ensures the source workbook is closed before the merge runs is:
Code:
    'close data file
    st_srchfn = "u:\PWS\Parks\Parks Operations\Sports\Sports17\DATA\" & ws_vh.Range("N2")
    If wb_nwb Is Nothing Then
        MsgBox wb_nwb & " is NOT open."
    Else
        wb_nwb.Close True 'saves data workbook after TYPE was updated for GS
    End If
Since the workbook gets closed, it doesn't matter whether it was hidden beforehand. I doubt it would matter anyway.
Quote:
Originally Posted by JennEx View Post
I would call that success. But, the 'Page of Pages' still refuses to populate. This is what I find to be most mysterious. If you refer to the document created by the macro launched merge in post 9 (https://drive.google.com/file/d/0B9E...ew?usp=sharing) with the file you provided, these merge fields populate although I have more than one record per page.
But with the code changes I suggested in my last post (post #14), you should now be getting one page per record. And, hopefully, the correct 'Page of Pages' output; if not, what is the incorrect 'Page of Pages' output you're getting?
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #17  
Old 05-04-2017, 06:58 AM
JennEx JennEx is offline Significant Blank Space At Top Of Page When Records Merged 1 Per Page Windows XP Significant Blank Space At Top Of Page When Records Merged 1 Per Page Office 2013
Competent Performer
Significant Blank Space At Top Of Page When Records Merged 1 Per Page
 
Join Date: May 2010
Posts: 158
JennEx is on a distinguished road
Default

Yes ... one report per page which is the important thing. However, I have noticed though that my other mail merge documents that rely on this code have been affected. The DT15v1.docx mail merge document that you have become far too familiar with is the only one in which one record per page is needed. My other similar reports that rely on the macro now have just one report per page (when they could have up to 3).

I think this can be fixed relatively easy in my macro by changing this line line (maybe)

Code:
If Left(itype, 1) <> "G" Then   'exclude GS reports
to
Code:
If Left(itype, 1) <> "G" and itype <> "DT" Then   'exclude GS and DT reports
The 'Page of Pages' thing I can sacrifice for everything else working. I think the mystery remains. It is so unpredictable. I printed off a couple reports just now to share, but they were both fine. Last night, not so much. Weird. The only difference between the two sessions of report printing from my application was from where. One was done from home and failed, the other at school which succeeded. Both Word versions are 14, but one is from Home Suite the other Professional respectively.

Paul, you have been an incredible help. As frustrating as it was at times, I appreciate your patience and your generosity. You offered a balance of provision and guidance for self support which was a great learning opportunity. All I can offer in return is sincerest appreciation.
Reply With Quote
  #18  
Old 05-04-2017, 03:36 PM
macropod's Avatar
macropod macropod is offline Significant Blank Space At Top Of Page When Records Merged 1 Per Page Windows 7 64bit Significant Blank Space At Top Of Page When Records Merged 1 Per Page Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 19,533
macropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to beholdmacropod is a splendid one to behold
Default

Quote:
Originally Posted by JennEx View Post
I think this can be fixed relatively easy in my macro by changing this line line (maybe)

Code:
If Left(itype, 1) <> "G" Then   'exclude GS reports
to
Code:
If Left(itype, 1) <> "G" and itype <> "DT" Then   'exclude GS and DT reports
I'd be inclined to use:
If (itype <> "GS") And (itype <> "DT") Then 'exclude GS and DT reports
Quote:
Originally Posted by JennEx View Post
The 'Page of Pages' thing I can sacrifice for everything else working. I think the mystery remains. It is so unpredictable. I printed off a couple reports just now to share, but they were both fine. Last night, not so much. Weird. The only difference between the two sessions of report printing from my application was from where. One was done from home and failed, the other at school which succeeded. Both Word versions are 14, but one is from Home Suite the other Professional respectively.
Maybe your Office installation at home is faulty. Try repairing it (via Windows Control Panel > Programs > Programs & Features > Microsoft Office (version) > Change > Repair).
__________________
Cheers,
Paul Edstein
[MS MVP - Word]
Reply With Quote
  #19  
Old 05-05-2017, 05:33 AM
JennEx JennEx is offline Significant Blank Space At Top Of Page When Records Merged 1 Per Page Windows XP Significant Blank Space At Top Of Page When Records Merged 1 Per Page Office 2013
Competent Performer
Significant Blank Space At Top Of Page When Records Merged 1 Per Page
 
Join Date: May 2010
Posts: 158
JennEx is on a distinguished road
Default

Yep. That worked.
I will see what I can do to sort things out with my home installation hoping that will be the painless way of resolving this last annoyance.

Thanks Paul.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Significant Blank Space At Top Of Page When Records Merged 1 Per Page Blank space at top of page Vecchia Word 4 12-26-2014 07:44 AM
Significant Blank Space At Top Of Page When Records Merged 1 Per Page Removing space before blank page / page break greasel Word 5 10-17-2014 07:04 PM
Insert page break vs blank page harvey4 Word 2 08-20-2014 07:15 PM
Multiple records on the same page Hugh Mail Merge 2 04-04-2014 05:24 PM
Significant Blank Space At Top Of Page When Records Merged 1 Per Page First section will not 'insert' blank page even though sectn 2 is 'odd' page break Pat_Hodgson Word 6 12-01-2013 04:22 PM


All times are GMT -7. The time now is 09:57 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2019 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft