Previous Document Next Document

Object Model Reference : Classes : G : Guide : Properties : Guide.Type


Guide.Type

Property Type As cdrGuideType

Description

Member of Guide

The Type property returns the guideline type. A guideline can be one of three types: horizontal, vertical, or slanted.

The Type property returns a read-only value.

VBA example

The following VBA example displays the number of horizontal, vertical, and slanted guidelines on the master page.

Sub Test()
 Dim s As Shape
 Dim hg As Long, vg As Long, sg As Long
 For Each s In ActiveDocument.Pages(0).Guides(cdrAllGuides)
  Select Case s.Guide.Type
   Case cdrVerticalGuide
    vg = vg + 1
   Case cdrSlantedGuide
    sg = sg + 1
   Case cdrHorizontalGuide
    hg = hg + 1
  End Select
 Next s
 MsgBox "The document contains:" & vbCr & _
  "Horizontal guides: " & hg & vbCr & _
  "Vertical guides: " & vg & vbCr & _
  "Slanted guides: " & sg
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.