Manipulate visio shapes with data passed from vb.net -
i have below code opening visio, opening file in visio, printing file , closing; works fine.
however, task pass information on visio document page called 'ticket task', bind information shapes , print it.
i know possible vb6 (that outdated code written in), there way in vb.net?
thanks!
code:
''set file path dim docpath string = system.environment.getfolderpath(system.environment.specialfolder.mydocuments) + "\" + splfiledata(0) + "\" + splfiledata(1) + ".vsd" 'set attributes opening/printing of document. psi.useshellexecute = true psi.verb = "print" 'psi.environmentvariables.add("orders", "hello") psi.arguments = printer psi.windowstyle = processwindowstyle.hidden psi.filename = docpath console.writeline("printing: " + docpath) 'start process (open visio document, print, close) process.start(psi)
you'll have change way you're opening , printing visio documents. this tutorial shows how use vb.net work documents. open function returns object of type microsoft.office.interop.visio.document. can use object attach information shapes discussed in here. in fact, vb.net code similar vb6. if want visio invisible, can open document follows:
microsoft.office.interop.visio.invisibleapp application = new microsoft.office.interop.visio.invisibleapp(); application.visible = false; microsoft.office.interop.visio.document doc = application.documents.open...
Comments
Post a Comment