none
While I Print a document, some time I get the exact number of pages but, some time, I get 0, or some wrong numbers, my code is bellow. RRS feed

  • Question

  •  

    I Went through msdn job_info_1, page delimiting some like that i don't know, what might be wrong any buddy can help me in this please I need it urgent, I would really appreciate. thnks in advance

     

     

    defaultPrintQueue2 =

    LocalPrintServer

    .GetDefaultPrintQueue()

     

    Dim jobs As PrintJobInfoCollection

    = defaultPrintQueue2.GetPrintJobInfoCollection

     

    For Each job As PrintSystemJobInfo In

    jobs

     

    If (Not ht2.Contains(job.JobIdentifier))

    Then

     

    If (Not ht1.Contains(job.JobIdentifier))

    Then

    ht2.Add(job.JobIdentifier, job.NumberOfPages)

    NumericUpDown1.Value = job.NumberOfPages

     

    If NumericUpDown1.Value > NumericUpDown2.Value

    Then

    job.Pause()

     

    End

    If

     

    End

    If

     

    End

    If

     

    Next

     

    Friday, November 18, 2011 3:46 AM

Answers

  • HI Saboor,

     

    I’m glad to hear you solved your issue. Would you please share your experience here? It’s very beneficial for other community members who have similar questions to see how your solved your issue.

     

    I would recommend your create a new thread with new title for your new issue. It will help community members easy to retrieve the issues.

     

    And your issue has few relationships for VSTO technical. I would recommend you post your issue at http://social.msdn.microsoft.com/Forums/en-IE/vbgeneral/threads for better support.

     

    Have a good day,

     

    Tom


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us
    • Marked as answer by Saboor Tanha Sunday, December 4, 2011 9:54 PM
    Tuesday, November 22, 2011 8:05 AM
    Moderator

All replies

  • Hi Saboor,

     

    Thanks for posting in the MSDN Forum.

     

    Would you please tell me some questions:

     

    1.         What type of instance about the variable “ht1” and “ht2”?

    2.         Where does your snippet exist? Does it exist in a document-level application, a Word add-in or other program?

     

    Have a good day,

     

    Tom


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us
    Monday, November 21, 2011 5:48 AM
    Moderator
  • Hi Tom,

     

    Thanks for your reply, I solved that problem I have another question if you can help me please. now I can get the full number of pages but, what if a person prints many copies of one page, it is not counting it, how to I count number of copies in a print job.not number of pages, and also, I can pause a local machine, gueue but, I want to pause a queue if some one prints from the network, I would really appreciate it if you could help me with this pleasee.

     

    Thanks

    Tuesday, November 22, 2011 12:00 AM
  • I am using vb.net 2010

     

    Tuesday, November 22, 2011 12:01 AM
  • HI Saboor,

     

    I’m glad to hear you solved your issue. Would you please share your experience here? It’s very beneficial for other community members who have similar questions to see how your solved your issue.

     

    I would recommend your create a new thread with new title for your new issue. It will help community members easy to retrieve the issues.

     

    And your issue has few relationships for VSTO technical. I would recommend you post your issue at http://social.msdn.microsoft.com/Forums/en-IE/vbgeneral/threads for better support.

     

    Have a good day,

     

    Tom


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us
    • Marked as answer by Saboor Tanha Sunday, December 4, 2011 9:54 PM
    Tuesday, November 22, 2011 8:05 AM
    Moderator