C
CADGuy
OK, I have a VB code which opens a VISIO file, goes to a tab called "notes1" and then sets the Print Page Setup to Landscape. However, when I execute this code, it does not change the page setup, ev3en though it runs through the tabs.
Dim stnObj As Visio.Document
Dim visSectionObject As Long
Dim visRowPrintProperties As Long
Dim visPrintPropertiesPageOrientation As Integer
appVisio = CreateObject("visio.application")
docsObj = appVisio.Documents
'opens the Basic Shapes stencil.
docObj = docsObj.Open("C:\Documents and Settings\kbranin\Desktop\New Folder\Boyle - (90)(E) - 238 La Grange.vsd")
stnObj = appVisio.Documents("C:\Documents and Settings\kbranin\Desktop\New Folder\Phase C Elec stencil.vss")
pagsObj = appVisio.ActiveDocument.Pages
appVisio.ActiveWindow.Page = appVisio.ActiveDocument.Pages.ItemU("Notes1")
appVisio.ActivePage.PageSheet.CellsSRC(visSectionObject, visRowPrintProperties, visPrintPropertiesPageOrientation).Formula = "=2"
appVisio.ActiveWindow.Page = appVisio.ActiveDocument.Pages.ItemU("Notes2")
appVisio.ActivePage.Background = False
appVisio.ActivePage.BackPage = ""
appVisio.ActivePage.PageSheet.CellsSRC(visSectionObject, visRowPrintProperties, visPrintPropertiesPageOrientation).FormulaForce = "=2"
appVisio.ActiveWindow.Page = appVisio.ActiveDocument.Pages.ItemU("Notes3")
appVisio.ActivePage.Background = False
appVisio.ActivePage.BackPage = ""
appVisio.ActivePage.PageSheet.CellsSRC(visSectionObject, visRowPrintProperties, visPrintPropertiesPageOrientation).FormulaForce = "=2"
MsgBox("Drawing finished!", , "Hello World!")
appVisio.Quit()
End Sub
Any input will be GREATLY appreciated.
Submitted via EggHeadCafe - Software Developer Portal of Choice
Get over $700 in E-learning Visual Studio.NET 2005 Courses Free till 11/17!
http://www.eggheadcafe.com/tutorial...46d-c03bb3ef7da7/get-over-700-in-elearni.aspx
Dim stnObj As Visio.Document
Dim visSectionObject As Long
Dim visRowPrintProperties As Long
Dim visPrintPropertiesPageOrientation As Integer
appVisio = CreateObject("visio.application")
docsObj = appVisio.Documents
'opens the Basic Shapes stencil.
docObj = docsObj.Open("C:\Documents and Settings\kbranin\Desktop\New Folder\Boyle - (90)(E) - 238 La Grange.vsd")
stnObj = appVisio.Documents("C:\Documents and Settings\kbranin\Desktop\New Folder\Phase C Elec stencil.vss")
pagsObj = appVisio.ActiveDocument.Pages
appVisio.ActiveWindow.Page = appVisio.ActiveDocument.Pages.ItemU("Notes1")
appVisio.ActivePage.PageSheet.CellsSRC(visSectionObject, visRowPrintProperties, visPrintPropertiesPageOrientation).Formula = "=2"
appVisio.ActiveWindow.Page = appVisio.ActiveDocument.Pages.ItemU("Notes2")
appVisio.ActivePage.Background = False
appVisio.ActivePage.BackPage = ""
appVisio.ActivePage.PageSheet.CellsSRC(visSectionObject, visRowPrintProperties, visPrintPropertiesPageOrientation).FormulaForce = "=2"
appVisio.ActiveWindow.Page = appVisio.ActiveDocument.Pages.ItemU("Notes3")
appVisio.ActivePage.Background = False
appVisio.ActivePage.BackPage = ""
appVisio.ActivePage.PageSheet.CellsSRC(visSectionObject, visRowPrintProperties, visPrintPropertiesPageOrientation).FormulaForce = "=2"
MsgBox("Drawing finished!", , "Hello World!")
appVisio.Quit()
End Sub
Any input will be GREATLY appreciated.
Submitted via EggHeadCafe - Software Developer Portal of Choice
Get over $700 in E-learning Visual Studio.NET 2005 Courses Free till 11/17!
http://www.eggheadcafe.com/tutorial...46d-c03bb3ef7da7/get-over-700-in-elearni.aspx