- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi All, just throwing this out there if you can help please
I have many drawings with upwards of 100 sheets (please don't roast me on this point)
If I need to insert a few sheets it get teadeous using the New Sheet function and then scrolling to the end a trying to drag the sheet to where I was when I inserted it so I am trying to put a VBA code snippet together to achieve this.
No problem inserting the sheet, title and border
Dim oDrawDoc As DrawingDocument
Set oDrawDoc = ThisApplication.ActiveDocument
Dim oSheet As Sheet
Set oSheet = oDrawDoc.Sheets.Add(kA3DrawingSheetSize, kLandscapePageOrientation, "THIS IS A NEW SHEET")
Dim oBorderDef As BorderDefinition
Dim oTitleBlockDef As TitleBlockDefinition
Dim oBorder As Border
Set oBorderDef = oDrawDoc.BorderDefinitions.Item("A3")
Dim oTitleBlock As TitleBlock
Set oTitleBlockDef = oDrawDoc.TitleBlockDefinitions.Item("A3")
Set oSheet = oDrawDoc.ActiveSheet
Set oBorder = oSheet.AddBorder(oBorderDef)
Set oTitleBlock = oSheet.AddTitleBlock(oTitleBlockDef)
just struggling to reposition the sheet in the browser pane to the position I was at when I ran the code
first I want to store the current browser position, which I will do before running the add sheet code
Dim oBroswerPane As BrowserPane
Dim oDesitinationSheetNode As BrowserNode
Set oDesitinationSheetNode SheetNode = obrowserpane.GetBrowserNodeFromObject(Sheet)
Then move the new sheet to the desitnation position (oDestinationSheetNode)
Dim oNewSheetNode As BrowserNode
Set oNewSheetNode = obrowserpane.GetBrowserNodeFromObject(Sheet)
Call obrowserpane.Reorder ?????????
Digging myself into a hole here - any help please?
Regards
Mark
Solved! Go to Solution.