![]() |
#1
|
||||
|
||||
![]()
This code is supposed to take info from the form for finished height and width and the sleeve size, and create a document that is (height x2 + sleeve size + .5 inches) in hieght and width is increased by 1 inch
Two problems. 1. The document doesn't get the .5" added to it and 2. The info bar still shows the document as 8.5"x11" Code:
Option Explicit Private Sub buttonOK_Click() If ValidateParams Then CreateVinylStreetBanner.Hide CreatePageLayout End If End Sub Private Function ValidateParams() As Boolean ValidateParams = True If (IsNumeric(boxWidth.Text) = False) Then GoTo ErrWidth If (IsNumeric(boxHeight.Text) = False) Then GoTo ErrHeight If (IsNumeric(boxSleeve.Text) = False) Then GoTo ErrSleeve Exit Function ErrWidth: MsgBox "Spacing not numeric : " & boxWidth.Text boxWidth.SetFocus ValidateParams = False Exit Function ErrHeight: MsgBox "Spacing not numeric : " & boxHeight.Text boxHeight.SetFocus ValidateParams = False Exit Function ErrSleeve: MsgBox "Spacing not numeric : " & boxSleeve.Text boxSleeve.SetFocus ValidateParams = False Exit Function End Function Public Sub CreatePageLayout() Dim doc As Document Dim BrowseOpenFile As String Dim OFName As OPENFILENAME Dim docH As Long Dim docW As Long Dim dw As Integer Dim dh As Integer Dim sl As Integer Dim sewn As Integer Dim p As Page sewn = 0.5 dw = GetValue(boxWidth.Value) dh = GetValue(boxHeight.Value) sl = GetValue(boxSleeve.Value) docH = dh + dh + sl + sewn docW = dw + 1 Set doc = CreateDocument() doc.Unit = cdrInch 'MsgBox "W:" & dw & " H:" & dh & " Sleeve:" & sl For Each p In ActiveDocument.Pages p.Orientation = cdrPortrait p.SizeWidth = docW p.SizeHeight = docH p.PrintExportBackground = False p.Bleed = 0# p.Background = cdrPageBackgroundNone Next p 'MsgBox "path:" & boxFile.Text If boxFile.Text <> "" Then Dim s5 As Shape Dim x As Double, y As Double Dim nsy As Double ActiveLayer.Import boxFile.Text, cdrAutoSense Set s5 = ActiveSelection s5.Move 0#, 0# ActiveDocument.ReferencePoint = cdrCenter s5.GetPosition x, y End If End Sub
__________________
Sean Waiting for a ride in the T.A.R.D.I.S. |
#2
|
||||
|
||||
![]()
Someone please help. This page size thing is driving me crazy. I finally figured out how to add the extra half an inch to my document.
__________________
Sean Waiting for a ride in the T.A.R.D.I.S. |
#3
|
||||
|
||||
![]()
Answered in http://www.oberonplace.com/forum/viewtopic.php?t=775 and locking this topic...
|
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Creating new document problems | ddonnahoe | Code Critique | 2 | 20-11-2004 17:11 |
Corel Photo Paint 11 Document Events problem | cyrilgupta | Corel Photo-Paint VBA | 1 | 07-11-2004 12:51 |
Document not open... | ddonnahoe | CorelDRAW/Corel DESIGNER VBA | 4 | 29-10-2004 14:13 |
Paste and Undo List problem | Michael Cervantes | Corel Photo-Paint VBA | 5 | 11-09-2004 04:47 |
Active document issues.. | wbochar | CorelDRAW/Corel DESIGNER VBA | 2 | 19-03-2003 15:15 |