VBA code to Add a Page with the attached properties?

D

Dennis

Visio 2003 Pro


when I select Tools>Add-Ons>SDK>Tools>Print ShapeSheet, one of my choices
gives me the following Page information.

SHAPESHEET : THEPAGE SHEET.0

Start Section : USER-DEFINED CELLS
End Section : USER-DEFINED CELLS (CELLS TOTAL : 0)

Start Section : CUSTOM PROPERTIES
End Section : CUSTOM PROPERTIES (CELLS TOTAL : 0)

Start Section : HYPERLINKS
End Section : HYPERLINKS (CELLS TOTAL : 0)

Start Section : ACTIONS
End Section : ACTIONS (CELLS TOTAL : 0)

Start Section : SCRATCH
End Section : SCRATCH (CELLS TOTAL : 0)

Start Section : PAGE PROPERTIES
Cell Value Formula
PageWidth 8.5000 in. 8.5 in
PageHeight 11.0000 in. 11 in
DrawingSizeType 0 0
ShdwType 0 No Formula
UIVisibility 0 0
PageScale 1.0000 in. 1 in
DrawingScale 1.0000 in. 1 in
DrawingScaleType 0 0
ShdwObliqueAngle 0.0000 deg. 0 deg
ShdwOffsetX 0.1250 in. 0.125 in
ShdwOffsetY -0.1250 in. -0.125 in
InhibitSnap FALSE FALSE
ShdwScaleFactor 100.0000% 100%
End Section : PAGE PROPERTIES (CELLS TOTAL : 13)

Start Section : PAGE LAYOUT
Cell Value Formula
PlaceStyle 0 0
PlaceDepth 0 0
PlowCode 0 0
ResizePage FALSE FALSE
DynamicsOff FALSE FALSE
EnableGrid FALSE FALSE
CtrlAsInput FALSE FALSE
LineAdjustFrom 0 0
PlaceFlip 0 0
BlockSizeX 1.0000 in. 1 in
BlockSizeY 1.0000 in. 1 in
AvenueSizeX 0.5000 in. 0.5 in
AvenueSizeY 0.5000 in. 0.5 in
RouteStyle 5 5
PageLineJumpDirX 0 0
PageLineJumpDirY 0 0
LineAdjustTo 0 0
LineRouteExt 0 0
LineToNodeX 0.1250 in. 0.125 in
LineToNodeY 0.1250 in. 0.125 in
LineToLineX 0.1250 in. 0.125 in
LineToLineY 0.1250 in. 0.125 in
LineJumpFactorX 0.6667 0.66666666666667
LineJumpFactorY 0.6667 0.66666666666667
LineJumpCode 1 1
LineJumpStyle 0 0
PageShapeSplit 0 0
End Section : PAGE LAYOUT (CELLS TOTAL : 27)

Start Section : RULER AND GRID
Cell Value Formula
XRulerOrigin 0.0000 in. 0 in
YRulerOrigin 0.0000 in. 0 in
XRulerDensity 32 32
YRulerDensity 32 32
XGridOrigin 0.0000 in. 0 in
YGridOrigin 0.0000 in. 0 in
XGridDensity 8 8
YGridDensity 8 8
XGridSpacing 0.0000 in. 0 in
YGridSpacing 0.0000 in. 0 in
End Section : RULER AND GRID (CELLS TOTAL : 10)

Start Section : ANNOTATION
End Section : ANNOTATION (CELLS TOTAL : 0)

Start Section : SMART TAGS
End Section : SMART TAGS (CELLS TOTAL : 0)

Start Section : LAYERS
Cell Value Formula
Layers.Name Flowchart Flowchart
Layers.Visible 1 1
Layers.Print 1 1
Layers.Active 0 0
Layers.Locked 0 0
Layers.Snap 1 1
Layers.Glue 1 1
Layers.Color 255 255
Layers.ColorTrans 0.0000% 0%
Layers.Name[2] Connector Connector
Layers.Visible[2] 1 1
Layers.Print[2] 1 1
Layers.Active[2] 0 0
Layers.Locked[2] 0 0
Layers.Snap[2] 1 1
Layers.Glue[2] 1 1
Layers.Color[2] 255 255
Layers.ColorTrans[2] 0.0000% 0%
End Section : LAYERS (CELLS TOTAL : 18)

Start Section : PRINT PROPERTIES
Cell Value Formula
PageLeftMargin 0.2500 in. 0.25 in
PageTopMargin 0.2500 in. 0.25 in
ScaleX 100.0000% 100%
PagesX 1 1
CenterX FALSE FALSE
OnPage FALSE FALSE
PrintPageOrientation 1 1
PaperSource 7 7
PageRightMargin 0.2500 in. 0.25 in
PageBottomMargin 0.2500 in. 0.25 in
ScaleY 100.0000% 100%
PagesY 1 1
CenterY FALSE FALSE
PrintGrid FALSE FALSE
PaperKind 1 1
End Section : PRINT PROPERTIES (CELLS TOTAL : 1

What would be the VBA code to Add a Page with the above properties?

Dennis
 
A

Al Edlund

without going through all of the parameters on the page, have you changed
any of the defaults?
If not, just use the macro recorder to record adding a page. If the default
page parameters are incorrect then
record a macro of creating the page/setting the parameters you want.

Al
Dennis said:
Visio 2003 Pro


when I select Tools>Add-Ons>SDK>Tools>Print ShapeSheet, one of my choices
gives me the following Page information.

SHAPESHEET : THEPAGE SHEET.0

Start Section : USER-DEFINED CELLS
End Section : USER-DEFINED CELLS (CELLS TOTAL : 0)

Start Section : CUSTOM PROPERTIES
End Section : CUSTOM PROPERTIES (CELLS TOTAL : 0)

Start Section : HYPERLINKS
End Section : HYPERLINKS (CELLS TOTAL : 0)

Start Section : ACTIONS
End Section : ACTIONS (CELLS TOTAL : 0)

Start Section : SCRATCH
End Section : SCRATCH (CELLS TOTAL : 0)

Start Section : PAGE PROPERTIES
Cell Value Formula
PageWidth 8.5000 in. 8.5 in
PageHeight 11.0000 in. 11 in
DrawingSizeType 0 0
ShdwType 0 No Formula
UIVisibility 0 0
PageScale 1.0000 in. 1 in
DrawingScale 1.0000 in. 1 in
DrawingScaleType 0 0
ShdwObliqueAngle 0.0000 deg. 0 deg
ShdwOffsetX 0.1250 in. 0.125 in
ShdwOffsetY -0.1250 in. -0.125 in
InhibitSnap FALSE FALSE
ShdwScaleFactor 100.0000% 100%
End Section : PAGE PROPERTIES (CELLS TOTAL : 13)

Start Section : PAGE LAYOUT
Cell Value Formula
PlaceStyle 0 0
PlaceDepth 0 0
PlowCode 0 0
ResizePage FALSE FALSE
DynamicsOff FALSE FALSE
EnableGrid FALSE FALSE
CtrlAsInput FALSE FALSE
LineAdjustFrom 0 0
PlaceFlip 0 0
BlockSizeX 1.0000 in. 1 in
BlockSizeY 1.0000 in. 1 in
AvenueSizeX 0.5000 in. 0.5 in
AvenueSizeY 0.5000 in. 0.5 in
RouteStyle 5 5
PageLineJumpDirX 0 0
PageLineJumpDirY 0 0
LineAdjustTo 0 0
LineRouteExt 0 0
LineToNodeX 0.1250 in. 0.125 in
LineToNodeY 0.1250 in. 0.125 in
LineToLineX 0.1250 in. 0.125 in
LineToLineY 0.1250 in. 0.125 in
LineJumpFactorX 0.6667 0.66666666666667
LineJumpFactorY 0.6667 0.66666666666667
LineJumpCode 1 1
LineJumpStyle 0 0
PageShapeSplit 0 0
End Section : PAGE LAYOUT (CELLS TOTAL : 27)

Start Section : RULER AND GRID
Cell Value Formula
XRulerOrigin 0.0000 in. 0 in
YRulerOrigin 0.0000 in. 0 in
XRulerDensity 32 32
YRulerDensity 32 32
XGridOrigin 0.0000 in. 0 in
YGridOrigin 0.0000 in. 0 in
XGridDensity 8 8
YGridDensity 8 8
XGridSpacing 0.0000 in. 0 in
YGridSpacing 0.0000 in. 0 in
End Section : RULER AND GRID (CELLS TOTAL : 10)

Start Section : ANNOTATION
End Section : ANNOTATION (CELLS TOTAL : 0)

Start Section : SMART TAGS
End Section : SMART TAGS (CELLS TOTAL : 0)

Start Section : LAYERS
Cell Value Formula
Layers.Name Flowchart Flowchart
Layers.Visible 1 1
Layers.Print 1 1
Layers.Active 0 0
Layers.Locked 0 0
Layers.Snap 1 1
Layers.Glue 1 1
Layers.Color 255 255
Layers.ColorTrans 0.0000% 0%
Layers.Name[2] Connector Connector
Layers.Visible[2] 1 1
Layers.Print[2] 1 1
Layers.Active[2] 0 0
Layers.Locked[2] 0 0
Layers.Snap[2] 1 1
Layers.Glue[2] 1 1
Layers.Color[2] 255 255
Layers.ColorTrans[2] 0.0000% 0%
End Section : LAYERS (CELLS TOTAL : 18)

Start Section : PRINT PROPERTIES
Cell Value Formula
PageLeftMargin 0.2500 in. 0.25 in
PageTopMargin 0.2500 in. 0.25 in
ScaleX 100.0000% 100%
PagesX 1 1
CenterX FALSE FALSE
OnPage FALSE FALSE
PrintPageOrientation 1 1
PaperSource 7 7
PageRightMargin 0.2500 in. 0.25 in
PageBottomMargin 0.2500 in. 0.25 in
ScaleY 100.0000% 100%
PagesY 1 1
CenterY FALSE FALSE
PrintGrid FALSE FALSE
PaperKind 1 1
End Section : PRINT PROPERTIES (CELLS TOTAL : 1

What would be the VBA code to Add a Page with the above properties?

Dennis
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top