Text.Origin.y won't work
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
This should be simple. See below code. The text in the dimension is centered, but then I want to position the dimension based off of variable that I captured previously. I tried using oDrawingDim.Text.origin = variable, but it doesn't do it. In the example below I changed the variable to the value of 5 just to clarify.
Dim oDoc As DrawingDocument
Set oDoc = ThisApplication.ActiveDocument
' Set a reference to the active sheet
Dim oSheet As sheet
Set oSheet = oDoc.ActiveSheet
Dim oDrawingDim As DrawingDimension
' Iterate over all dimensions in the drawing and
' center them if they are linear or angular.
For Each oDrawingDim In oSheet.drawingDimensions
If TypeOf oDrawingDim Is LinearGeneralDimension Or _
TypeOf oDrawingDim Is AngularGeneralDimension Then
Call oDrawingDim.CenterText
oDrawingDim.Text.origin.y = 5
End If
Next