How to make the Paste Special dialog default to pasting Inline rather than Floating
(Provided you select a Paste Special format which is capable of being pasted Inline, such as “Picture”, and not one that isn't, such as “MS Office Drawing Objects”)
Article contributed by Dave Rado and Bill Coan
In Word 97, when you use Edit + Paste to paste pictures, and OLE objects such as Excel charts, they paste as Floating objects. If you want to paste them Inline (and in most circumstances, you would be well-advised to do so), you have to use Edit + Paste Special, and clear the “Float over text” checkbox.
It's a pain having to clear that checkbox all the time, but you can make the dialog default to having the “Float” box unticked by intercepting the EditPasteSpecial command as follows:
Sub EditPasteSpecial()
SendKeys "%t%a"
Dialogs(wdDialogEditPasteSpecial).Show
End Sub
By giving it the same name as the Word command, the macro intercepts the command and will run automatically when you select Edit + Paste Special.
[Unfortunately, the .Floating argument of the wdDialogEditPasteSpecial object is readonly – one of the literally hundreds of wdDialog bugs; hence the need to use SendKeys.]
In Word 2000 and above, there is some good news and some bad news.
The good news is that if you use Edit + Paste, pictures and other objects get pasted Inline. (The only exceptions are floating graphics copied from Word, which remain floating.) Seems that someone at Microsoft was listening to the howls of protest!
Better still, in Word 2002 you can, if you wish, change the default behaviour to one of the Floating wrapping formats by modifying the setting: “Insert/paste pictures as”, under Tools + Options + Edit. This changes the behaviour of Edit + Paste, Edit + Paste Special, and Insert + Picture.
The bad news in Word 2000 is that Edit + Paste Special inserts everything Floating. (The only exceptions are inline graphics copied from Word, which remain inline.) In fact, they've actually removed the “Float over text” checkbox in the Paste Special dialog, so you have no choice any more – and so the above macro won't work in Word 2000 and above.
Word 2002 is a little better than Word 2000. The “Insert/paste pictures as” setting under Tools + Options + Edit does change the Paste Special behaviour. If you copy some text, or a graphic from another application, it will behave according to the Tools + Options setting. (If you paste a floating graphic, it will always paste floating, but that's logical.) The bad news, in Word 2002, is that if you paste a text box, or any other MS Office Drawing Object, “As Picture”, it will paste floating. This is even the case if you copied the Drawing Object from PowerPoint or Excel.
Unfortunately, there's no way of working round the lack of choice in the Paste Special dialog, but you can at least change its behaviour so that it pastes Inline rather than Floating, by using the following macro. Again, by giving it the same name as the Word command, the macro intercepts the command and will run automatically when you select Edit + Paste Special:
Sub EditPasteSpecial()
'Forces pasted objects to be Inline rather than
Floating,
'except in the case of objects that can't be pasted Inline,
'such as text boxes
Dim StartCount As Long,
EndCount As Long
On Error Resume Next
'To allow for text boxes, etc.
StartCount = ActiveDocument.Shapes.Count
Dialogs(wdDialogEditPasteSpecial).Show
EndCount = ActiveDocument.Shapes.Count
If EndCount > StartCount
Then
ActiveDocument.Shapes(EndCount).ConvertToInlineShape
End If
On Error GoTo 0
End Sub