蒹葭苍苍,白露为霜。
所谓伊人,在水一方。

重附着引出序号

Public Sub AutoReattachAnnotation()
Dim odoc As Document
Set odoc = ThisApplication.ActiveDocument
If ThisApplication.Documents.Count = 0 Then
MsgBox "A document must be open", vbExclamation
Else
If odoc.DocumentType <> kDrawingDocumentObject Then
MsgBox "Must be in Drawing document", vbExclamation
Else
Dim oDrawDoc As DrawingDocument
Set oDrawDoc = ThisApplication.ActiveDocument
Dim oSelectset As SelectSet
Set oSelectset = oDrawDoc.SelectSet
oSelectset.Clear
Dim oBalloon As Balloon
Dim aantal As Integer
aantal = oDrawDoc.ActiveSheet.Balloons.Count
Dim oTG As TransientObjects
Set oTG = ThisApplication.TransientObjects
Dim oBalloonCollection As ObjectCollection
Set oBalloonCollection = oTG.CreateObjectCollection
Dim i As Integer
For i = 1 To oDrawDoc.ActiveSheet.Balloons.Count
Set oBalloon = oDrawDoc.ActiveSheet.Balloons.Item(i)
Call oBalloonCollection.Add(oBalloon)
Next
Call oSelectset.SelectMultiple(oBalloonCollection)
Call ThisApplication.CommandManager.ControlDefinitions.Item("DLxAnnoReconnectCmd").Execute
oSelectset.Clear
End If
End If
End Sub
赞(0) 打赏
未经允许不得转载:酷居科技 » 重附着引出序号

评论 1

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址
  1. #1

    感谢分享

    加气块设备7年前 (2017-08-03)回复

锦瑟无端五十弦,一弦一柱思华年

酷居科技联系我们

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏