View Single Post
 
Old 04-15-2013, 11:28 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

Try making your copy/paste start with the period (i.e omit http://www). If the paste starts with the period, you won't get the unwanted space. Similarly, if the copied string terminates in a '/', a trailing space isn't inserted.

An alternative would be to use a macro:
Code:
Private Sub PasteUnformattedText()
Dim MyData As DataObject
On Error GoTo ErrExit
Set MyData = New DataObject
MyData.GetFromClipboard
Selection.Range.Text = MyData.GetText
ErrExit:
End Sub
The above macro has broader application than your html coding, being useful for any unformatted text pasting. Simply assign it to a keyboard shortcut.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote