You appear to be using ad blocking software. While I respect your right to do so, please be aware
that the minimal advertising on this site helps defray the cost of providing this facility, and I would therefore ask that you turn off
the blocker while browsing this site.
Many people access the material from this web site daily.
Most just take what they want and run. That's OK, provided they
are not selling on the material as their own; however if your
productivity gains from the material you have used, a donation
from the money you have saved would help to ensure the continued
availability of this resource. Click the appropriate button
above to access PayPal.
Scanning into Microsoft Word from Version 2007 onwards
There have been numerous complaints from Word 2003 users who have
upgraded to Word 2007/2010 that the tool
that allows documents to be scanned as images, directly into Word, appears to be
missing in the newer versions. In fact it is not missing, but very well hidden,
fellow MVP Herb Tyson spotted that the ancient WordBasic command to call the old
dialog has been retained in the application, and so with a little juggling and
the aid of a macro, it is possible to add the command to the QAT (Quick Access Toolbar)
thus restoring the ability to scan into these versions.
The macro code is simplicity itself
On Error Resume Next
Clicking the button (or running the macro) produces the following familiar dialog:
Word 2013 and later (it also works for 2007 and 2010)
Simple though the above is for Word 2007 and 2010, it doesn't
work with Word 2013 and later, as the all important WordBasic
command has been removed from the VBA command set of those
versions. Fortunately all is not lost. A more complex approach
will do the job, and, as the heading suggests, this version also
works for Word 2007 and 2010.
The following macros include alternative
code samples for Excel and Outlook e-mail messages.
The method uses the WIA interface which requires a reference to
the Microsoft Windows Image Acquisition object library to be set
in vba - tools > references.
The macro displays the WIA dialog
'Requires a reference to Microsoft Windows Image Acquisition
Dim objCommonDialog As WIA.CommonDialog
Dim objImage As WIA.ImageFile
Dim strPath As String
On Error Resume Next
Set objCommonDialog = New WIA.CommonDialog
Set objImage = objCommonDialog.ShowAcquireImage
strPath = Environ("TEMP") & "\TempScan.jpg" ' set temporary file
If Not objImage Is Nothing Then
objImage.SaveFile strPath ' save into temporary file
' Insert in Word Document
' Insert in Excel worksheet
'Insert into Outlook message
'If TypeName(ActiveWindow) = "Inspector" Then
' If ActiveInspector.IsWordMail And ActiveInspector.EditorType =
' End If
Set objImage = Nothing
If Not Dir(strPath) = vbNullString Then Kill strPath 'Remove the
Set objCommonDialog = Nothing