vba - Converting word dialog to VB -



vba - Converting word dialog to VB -

it has been long time since doing type of coding. i've been tasked send test page (looks old tv test pattern page) of our printers prior shift start. these pages help our team determine if there physical issues printers (bad toner, fuser, etc) have found code , used in vba (ms word).

sub sorterprint01() dim sprinter string dim sprinter1 string dialogs(wddialogfileprintsetup) sprinter = .printer .printer = "\\dc999nt09\usprt_01" .donotsetassysdefault = true .execute application.printout filename = "\\dc999file\share\7yr\support\is_team_local\test sheets\barcode test sorter01.docx" .printer = sprinter .execute end end sub

i created form print or specific printer. management not want in word doc , prefer have in vb app (even improve web based). after extensive research have found wddialogfileprintsetup word based dialog , not work in vb6/2008/2013). getting coding , need quick solution.

use automation. if want print docx files you'll need word.

set word = createobject("word.application") word.dialogs(wddialogfileprintsetup)

etc. preface objects word..

if using vbscript (which can't access constants - nor can vb6 if don't add together word reference) need specify actual number wddialogfileprintsetup equal to.

so

with word.dialogs(97)

vba printing vb6 vbe

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -