Here is the DVB.
I have copied the file and renamed it to upload to the 2016 version and checked the missing reference library. I have a custom toolbar button that references the different functions "Copy text"/"Paste text"/"Paste Text Ordered"
When I used the toolbar buttons my command reads the macro name and -vbarun but nothing happens
'AutoCAD VBA Macros
'Last Updated: 6/29/2005
'*************************
Option Explicit
Public Sub PasteText()
'Pastes lines of text from the clipboard to text objects in AutoCAD
On Error GoTo ExitSub
Dim objText As Object, SelSet As AcadSelectionSet
'Get the selected AutoCAD objects
Set SelSet = AutoCAD.ActiveDocument.ActiveSelectionSet
Dim iIndex As Integer, strText() As String
Dim strNew As String, strClipboard As String
Dim iTextIndex As Integer
'Copy the contents off the clipboard
strClipboard = modClipboard.GetText()
If strClipboard = "" Then Exit Sub
'Parse the contents into lines
strText = Split(strClipboard, vbCrLf)
iTextIndex = 0
For iIndex = 0 To SelSet.Count - 1
Set objText = SelSet.Item(iIndex)
If iTextIndex > UBound(strText) Then Exit Sub
'Determine if the selected item is text, and update it if it is
If TypeOf objText Is AcadText Or TypeOf objText Is AcadMText Then
strNew = strText(iTextIndex)
objText.TextString = strNew
iTextIndex = iTextIndex + 1
End If
Next iIndex
ExitSub:
End Sub
Public Sub CopyText()
'Copies multiple text objects from AutoCAD to the clipboard
On Error GoTo ExitSub
Dim objText As Object, SelSet As AcadSelectionSet
'Get the selected AutoCAD objects
Set SelSet = AutoCAD.ActiveDocument.ActiveSelectionSet
Dim iIndex As Integer
Dim strCopy As String, strClipboard As String
Dim iTextIndex As Integer
Dim aText() As String
iTextIndex = 0
'Don't run without selected objects
If SelSet.Count = 0 Then Exit Sub
For iIndex = 0 To SelSet.Count - 1
Set objText = SelSet.Item(iIndex)
'Determine if the selected item is text, and put text in array if it is
If TypeOf objText Is AcadText Or TypeOf objText Is AcadMText Then
strCopy = objText.TextString
ReDim Preserve aText(0 To iTextIndex)
aText(iTextIndex) = strCopy
iTextIndex = iTextIndex + 1
End If
Next iIndex
Dim strBuffer As String
strBuffer = ""
'Now populate the clipboard with data from the array
For iIndex = 0 To UBound(aText)
strBuffer = strBuffer & aText(iIndex)
'Add a carriage return for all but the last item
If iIndex < UBound(aText) Then
strBuffer = strBuffer & vbCrLf
End If
Next iIndex
'Update the clipboard
Call modClipboard.SetText(strBuffer)
ExitSub:
End Sub
Public Sub PasteTextOrdered()
'Pastes text from the clipboard in the order specified by the user
On Error GoTo ExitSub
'Get the active document
Dim objDoc As AcadDocument, SelSet As AcadSelectionSet
Set objDoc = AutoCAD.ActiveDocument
'Get the selected objects
Set SelSet = objDoc.ActiveSelectionSet
Dim strPrompt As String, strInput As String
Dim intCoord As Integer
'Prompt the user for vertical or horizontal ordering
strPrompt = vbCrLf & vbCrLf & "Specify [Vertical/Horizontal]: "
strInput = objDoc.Utility.GetString(1, strPrompt)
'Determine the user's input and update the coordinate type and next prompt
If InStr(Mid("horizontal", 1, Len(strInput)), LCase(strInput)) <> 0 Then
intCoord = 0
strPrompt = vbCrLf & vbCrLf & "Specify [Left/Right]: "
Else
intCoord = 1
strPrompt = vbCrLf & vbCrLf & "Specify [Top/Bottom]: "
End If
'Get user input about top-bottom left-right ordering
strInput = objDoc.Utility.GetString(1, strPrompt)
Dim blnTopRight As Boolean
'Set variables based on user input
If intCoord = 1 Then
If InStr(Mid("bottom", 1, Len(strInput)), LCase(strInput)) <> 0 Then
blnTopRight = False
Else
blnTopRight = True
End If
Else
If InStr(Mid("right", 1, Len(strInput)), LCase(strInput)) <> 0 Then
blnTopRight = True
Else
blnTopRight = False
End If
End If
Dim aTextObjects() As Object, objText As Object
'Sort the objects based on user settings
aTextObjects = SortTextObjects(SelSet, intCoord, blnTopRight)
Dim iIndex As Integer, strText() As String
Dim strNew As String, strClipboard As String
'Copy the contents off the clipboard
strClipboard = modClipboard.GetText()
If strClipboard = "" Then Exit Sub
'Parse the contents into lines
strText = Split(strClipboard, vbCrLf)
For iIndex = 0 To UBound(aTextObjects)
Set objText = aTextObjects(iIndex)
If iIndex > UBound(strText) Then Exit Sub
strNew = strText(iIndex)
objText.TextString = strNew
Next iIndex
ExitSub:
End Sub