Jump to content

line of vb to autoit


Cyberonimo
 Share

Recommended Posts

  • Moderators

@Cyberonimo you need to be more specific about what you want to do with the Printer object once created. Are you trying to create a connection to a printer? Delete one? etc.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

  • Moderators

@Cyberonimo the forum has an awesome search feature that is worth trying if you are unsure where to begin. It would have led you to this, which sounds like it is just what you're after:

 

 

 

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

Thanks 

I check the topic, and is very useful, but dont have function to add print server

can you help me, to translate this to autoit

' -------------------- GetPrintXpsDocumentWriter() -------------------
''' <summary>
'''   Returns an XpsDocumentWriter for the default print queue.</summary>
''' <returns>
'''   An XpsDocumentWriter for the default print queue.</returns>
Private Function GetPrintXpsDocumentWriter() As XpsDocumentWriter
	' Create a local print server
	Dim ps As New LocalPrintServer()

	' Get the default print queue
	Dim pq As PrintQueue = ps.DefaultPrintQueue

	' Get an XpsDocumentWriter for the default print queue
	Dim xpsdw As XpsDocumentWriter = PrintQueue.CreateXpsDocumentWriter(pq)
	Return xpsdw
End Function ' end:GetPrintXpsDocumentWriter()

thanks for your patience

I will appreciate it

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...