Message 1 of 15
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi.
Got a Code to change the drawing sheetsize and bordertype.
Planning to run it as an external rule but cant get it to work.
Dim oDoc As Document
oDoc = ThisDoc.Document
Dim Doctype As String = "Drawing"
'doc = ThisApplication.ActiveDocument
'check file type
If oDoc.DocumentType = kDrawingDocumentObject Then
Dim selectedSize As String = "Sheet"
Dim sizeList As New ArrayList
sizeList.Add("A1")
sizeList.Add("A2")
sizeList.Add("A3")
sizeList.Add("A4")
'Display input list box and select size
selectedSize = InputListBox("Select Size", sizeList, selectedSize, Title := "Change size",ListName := "Size")
If selectedSize = "A1" Then
ActiveSheet.ChangeSize("A1", MoveBorderItems := True)
ThisApplication.ActiveDocument.ActiveSheet.Orientation = kLandscapePageOrientation
ActiveSheet.Border = "A1"
End If
Else
MessageBox.Show("This rule can only be run in a " & DocType & " file", "iLogic")
Return
End If
The two rows in Red seems to be the problem. If I comment them out it works and i get my Messagebox.
Thanks in advance.
//Jesper
//Jesper
Did you find this reply helpful ? If so please use the Accept as Solution or Kudos button below.
Solved! Go to Solution.
