View Single Post
 
Old 09-13-2012, 04:39 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi kyjac85,

Try the following revision to the macro. I've taken out the SendKeys reference (it may be that your keyboard intercept doesn't recognise it) and added code for the new line:
Code:
Sub InsertData()
Application.ScreenUpdating = False
With Selection
  .Text = Split(Split(ActiveDocument.Name, ".")(0), "_")(0) & Chr(11)
  .Collapse wdCollapseEnd
  .Paste
End With
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote