Click here to Skip to main content
15,903,175 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionRuntime Error 430?? Pin
erikkloeze19-Feb-04 21:49
erikkloeze19-Feb-04 21:49 
AnswerRe: Runtime Error 430?? Pin
Nadroj20-Feb-04 1:57
Nadroj20-Feb-04 1:57 
GeneralRe: Runtime Error 430?? Pin
erikkloeze20-Feb-04 3:40
erikkloeze20-Feb-04 3:40 
GeneralRe: Runtime Error 430?? Pin
Nadroj20-Feb-04 4:36
Nadroj20-Feb-04 4:36 
GeneralRe: Runtime Error 430?? Pin
Nadroj20-Feb-04 4:50
Nadroj20-Feb-04 4:50 
GeneralRe: Runtime Error 430?? Pin
erikkloeze20-Feb-04 10:03
erikkloeze20-Feb-04 10:03 
GeneralRe: Runtime Error 430?? Pin
Nadroj20-Feb-04 11:38
Nadroj20-Feb-04 11:38 
GeneralSet Printer Using Printing API Pin
Edbert P19-Feb-04 19:07
Edbert P19-Feb-04 19:07 
I have found this code to set printer properties using Windows API:

Controlling the Printer from Word VBA[^]

which is basically a further development of Microsoft's article:

HOWTO: Set Duplex Printing for Word Automation[^]

I want to ask whether any of you guys have done or have any ideas on how to set printer stapling using the code above.

I am thinking of creating a new constant for the stapling, e.g.

     Public Const DM_DUPLEX = &H1000&
     Public Const DM_STAPLE = &H2000& '(added line)

and add a new variable in the DEVMODE Type:

     Public Type DEVMODE
          dmStaple as integer
     End Type

then set the dmStaple and set it to the printer using the API, but somehow I don't think it is going to work at all.

Question:
1. Can I set printer stapling using the API mentioned in the sites above?
2. If I can, can I do it like the above? If not, can you please point me to the right direction (e.g. giving a link to SDK site / MSDN article, code snippets, etc.)

Thanks.

Edbert P.
Sydney, Australia.
GeneralRe: Set Printer Using Printing API Pin
Duncan Edwards Jones20-Feb-04 8:09
professionalDuncan Edwards Jones20-Feb-04 8:09 
GeneralRe: Set Printer Using Printing API Pin
Duncan Edwards Jones20-Feb-04 8:13
professionalDuncan Edwards Jones20-Feb-04 8:13 
GeneralRe: Set Printer Using Printing API Pin
Edbert P22-Feb-04 17:35
Edbert P22-Feb-04 17:35 
Generala problem in VB 6 (textbox.text) Pin
Nazila Naderi19-Feb-04 18:47
Nazila Naderi19-Feb-04 18:47 
GeneralRe: a problem in VB 6 (textbox.text) Pin
Nadroj20-Feb-04 12:46
Nadroj20-Feb-04 12:46 
GeneralRe: more details?! Pin
Nazila Naderi20-Feb-04 15:14
Nazila Naderi20-Feb-04 15:14 
GeneralRe: a problem in VB 6 (textbox.text) Pin
Hesham Amin20-Feb-04 21:40
Hesham Amin20-Feb-04 21:40 
GeneralTAB CONTROLS Pin
len_ems19-Feb-04 17:28
len_ems19-Feb-04 17:28 
GeneralRe: TAB CONTROLS Pin
Dave Kreskowiak22-Feb-04 16:36
mveDave Kreskowiak22-Feb-04 16:36 
GeneralRe: TAB CONTROLS Pin
Anonymous23-Feb-04 23:23
Anonymous23-Feb-04 23:23 
GeneralRe: TAB CONTROLS Pin
Dave Kreskowiak24-Feb-04 6:14
mveDave Kreskowiak24-Feb-04 6:14 
GeneralAdding PageBreak in Excel Pin
nvmoss19-Feb-04 11:15
nvmoss19-Feb-04 11:15 
GeneralGlobal Error Handler Pin
kingspawn19-Feb-04 8:09
kingspawn19-Feb-04 8:09 
GeneralRe: Global Error Handler Pin
John Kuhn19-Feb-04 14:11
John Kuhn19-Feb-04 14:11 
GeneralRe: Global Error Handler Pin
SimonCampbell20-Feb-04 2:03
SimonCampbell20-Feb-04 2:03 
GeneralRe: Global Error Handler Pin
John Kuhn20-Feb-04 7:52
John Kuhn20-Feb-04 7:52 
GeneralRe: Global Error Handler Pin
kingspawn20-Feb-04 9:57
kingspawn20-Feb-04 9:57 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.