Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-07-2017, 06:19 PM
darkmich darkmich is offline Printing with DisplayAlerts to suppress margin warnings not working Mac OS X Printing with DisplayAlerts to suppress margin warnings not working Office 2011 for Mac
Novice
Printing with DisplayAlerts to suppress margin warnings not working
 
Join Date: Jun 2017
Posts: 1
darkmich is on a distinguished road
Default Printing with DisplayAlerts to suppress margin warnings not working

I've got a Word macro that's set up to ask for some input, access an Excel spreadsheet to get the remaining data, put that into a label with a QR barcode, and print. My problem is in printing - I get the margin/page size warnings whenever I print to the label printer. I had successfully used Application.DisplayAlerts to suppress them using the following subroutine that I call when printing:



Code:
Sub Print_ShowNoMarginsWarning_DoNotShowPrintDialog()
    With Application
        'Turn off DisplayAlerts
        .DisplayAlerts = 0

        'Print document
        'Background print must be turned off to prevent message
        .PrintOut Background:=False, Range:=wdPrintFromTo, From:="1", To:="1"
        
        'Turn on DisplayAlerts again
        .DisplayAlerts = wdAlertsAll
    End With
End Sub
However, we just got a second label printer, as we print two types of labels depending on what they're being put on to. I therefore edited the code along these lines:

Code:
    If Tissue = "10%" Then
        Printer_Name = "CVM-215-VS33-ZEB1"
    Else
        Printer_Name = "ZDesigner TLP 2844"
    EndIf

With Application
    sCurrentPrinter = .ActivePrinter
    .ActivePrinter = Printer_Name
    For A = 1 To copies
        Call Print_ShowNoMarginsWarning_DoNotShowPrintDialog
    Next
    .ActivePrinter = sCurrentPrinter
End With
While this works to print labels to the correct printers, ONE of the printers is still printing the margin warning, while the other works as I expect. Any thoughts? This has been driving me crazy all day.
Reply With Quote
Reply

Tags
displayalerts, margin warning, printing



Similar Threads
Thread Thread Starter Forum Replies Last Post
Printing with DisplayAlerts to suppress margin warnings not working White space margin appearing in the header when printing to pdf or paper avinkris Word 3 03-21-2017 10:41 PM
Printing with DisplayAlerts to suppress margin warnings not working Word Doc printing tiny in left top corner margin waynefusion Word 6 11-02-2016 08:59 AM
Printing with DisplayAlerts to suppress margin warnings not working Left Margin Cuts off in Quick Preview and in Printing Guru Word 2 07-28-2016 11:21 AM
Printing with DisplayAlerts to suppress margin warnings not working Bottom margin not working cryptogram Word 11 08-28-2013 01:49 AM
Margin-less/Borderless Printing tmndi Word 2 08-13-2011 12:48 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:46 PM.


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