Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2006
    Thanked 0 Times in 0 Posts

    Autonumbering issue (2003)


    Screenshot shows Visio

  2. #2
    Star Lounger
    Join Date
    Jul 2006
    Colorado, USA
    Thanked 0 Times in 0 Posts

    Re: Autonumbering issue (2003)

    If you have already run the Auto Number on the shapes, then the problem is that the numbers are in the ShapeSheet as numbers and the Prop.ShapeNumber.Format doesn't seem to work, even if it is set to "0.0". One way around this is to convert all the numbers just generated into strings with the trailing zero attached. The problem with this is that it would be a pain to update. If you wanted to do that, you could run something like this:

    Sub FormatNumbers()
    Dim n As Integer
    For n = 1 To ActiveDocument.Pages(1).Shapes.Count
    If ActiveDocument.Pages(1).Shapes(n).CellExists("Prop .ShapeNumber", True) Then
    If ActiveDocument.Pages(1).Shapes(n).Cells("Prop.Shap eNumber.Value").Formula <> "" Then
    ActiveDocument.Pages(1).Shapes(n).Cells("Prop.Shap eNumber.Value").Formula = Chr$(34) & ActiveDocument.Pages(1).Shapes(n).Cells("Prop.Shap eNumber.Value").Formula & ".0" & Chr$(34)
    ActiveDocument.Pages(1).Shapes(n).Cells("Prop.Shap eNumber.Format").Formula = Chr$(34) & "0.0" & Chr$(34)
    End If
    End If
    Next n
    End Sub

    Of course you would have to add a loop for more than one page if you have more than one. And of course, if you don't like to use VBA, ignore everything I said. Just open up every Shape's ShapeSheet and find the Custom Properties Prop.ShapeNumber Value cell and change it so that you put the number in quotes and with the trailing zero.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts