Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 341083
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T10:40:35+00:00 2026-05-12T10:40:35+00:00

In our VB6 application, when the user’s default printer is set to Microsoft Office

  • 0

In our VB6 application, when the user’s default printer is set to Microsoft Office Document Image Writer the following line of code causes the application to throw error number 380 (Invalid property value).

Printer.Orientation = vbPRORLandscape

If you are unfamiliar with what this line is doing, it is responsible for ensuring that the user’s default printer is set up to print whatever is provided to it in landscape mode, and also provides landscape orientation dimensions (height/width) (on the Printer object) so following code can properly base item placement coordinates on the page.

I’ve Goggled around and it seems to be a generally accepted (and complained about) “missing feature” from the MODIW driver, for example see this thread. There were some workarounds like presenting the user with the Windows Printer Settings window (after presumably instructing them to select landscape in the options) or checking if the printer is the MODIW, and then preventing the user from generating the document that needs to be in landscape mode. There was another suggesting involving something called DEVMODE, but I didn’t understand this suggestion, nor did I find a decent example, nor did I find anyone confirming that it worked.

I’m kinda at my wits end. Physical printers have no issue with this line; even the Microsoft XPS Document Writer and the various PDF printers I have tried have no issues with this line. I’m throwing this out here, hoping some awesome VB6 dev has found some previously undocumented way of making the orientation change with the Microsoft Office Document Image Writer driver.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T10:40:35+00:00Added an answer on May 12, 2026 at 10:40 am

    Here is a weird workaround you could try for this weird bug. Microsoft offer a free DLL that allows you to change the default settings for the printer, rather than just temporarily setting to landscape for the current document using the Printer object.

    So you could try something like this (sample form code from the KnowledgeBase article). It changes the default orientation to landscape before doing any printing. Then it restores the original default orientation when the form is unloaded. I haven’t tried this, don’t know whether it will work.

    Dim obj As PageSet.PrinterControl
    
    Private Sub Command1_Click()
      On Error GoTo errorhandler:
      Set obj = New PrinterControl
      obj.ChngOrientationLandscape
      <Now do the printing>
    
      Exit Sub
    
    errorhandler:
       MsgBox Err.Description
       obj.ReSetOrientation
    
    End Sub
    
    
    Private Sub Form_Unload(Cancel As Integer)
    
      obj.ReSetOrientation 'This resets the printer to portrait.'
    
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 219k
  • Answers 219k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer This code runs all 6 HTTP requests in parallel on… May 12, 2026 at 11:52 pm
  • Editorial Team
    Editorial Team added an answer @buken how do you know that both are loading with… May 12, 2026 at 11:52 pm
  • Editorial Team
    Editorial Team added an answer Sqlite is available in (at least) two major versions, 2… May 12, 2026 at 11:52 pm

Related Questions

In our VB6 application, when the user's default printer is set to Microsoft Office
Is it possible to use the default ComboBox control under VB6 to make it
I have a legacy VB6 application that was built using MSDE. As many client's
When debugging a VB6 application, I have noticed that the VB6 IDE keeps any
I have a VB6 ActiveX DLL that has run fine on all our machines

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.