View Single Post
 
Old 09-20-2012, 03:11 PM
kyjac85 kyjac85 is offline Windows 7 64bit Office 2010 64bit
Novice
 
Join Date: Sep 2012
Posts: 10
kyjac85 is on a distinguished road
Default

I don't know why but this code is not working for me anymore. I haven't changed any of the code either. I'm trying to find an answer to this, but so far the adding reference libraries hasn't worked yet.

Code:
Sub InsertClipboard()
'
' InsertClipboard Macro
'
'
Application.ScreenUpdating = False
With Selection
  .Text = Split(Split(ActiveDocument.Name, ".")(0), "_")(0) & Chr(11)
  .Collapse wdCollapseEnd
  .Paste
End With
Dim MyData As DataObject
Set MyData = New DataObject
MyData.SetText ""
MyData.PutInClipboard
Application.ScreenUpdating = True
End Sub
It keeps telling me Compile error: User-defined type not defined.
Reply With Quote