|
-
Sep 22nd, 2009, 07:30 PM
#1
Thread Starter
New Member
Variant Question
My object browser says
VisibleBounds As Variant
Member of InDesign.PageItem
The bounds of the page item including the stroke.
So, why does the following code give me a "type Mismatch: 'PageBounds'"?
Set myIndesign = CreateObject("Indesign.Application.2.0")
Set Doc12up = myInDesign.ActiveDocument
'Loop through each selected item
For x = 1 To Doc12up.Selection.Count
'set oPageItem object to item in pageitems collection
Set oPageItem = Doc12up.Selection.Item(x)
If TypeName(oPageItem.Parent) = "Page" Or TypeName(oPageItem.Parent) = "Spread" Then
Set CurrentPage = oPageItem.Parent
If TypeName(CurrentPage) = "Spread" Then
Set CurrentPage = CurrentPage.Pages.Item(1)
End If
PageBounds() = oPageItem.VisibleBounds
PageWidth = PageBounds(3) - PageBounds(1)
PageHeight = PageBounds(2) - PageBounds(0)
End If
Next
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|