How to insert picture or image from scanner or camera in Word?
You might get into trouble in inserting pictures from scanner or camera in Word 2007 and later version as Microsoft removed the option to insert a picture from a scanner or camera which was just available in Word 2003. This tutorial will show you several methods of inserting pictures from scanner or camera in Word 2007 and later version.
Insert picture from scanner or camera in Word by using shortcuts
If you are using the Word 2007 or Word 2010, you can quickly access the Insert Picture from Scanner or Camera utility as follows:
1. Please first press Alt key in Word 2007 or Word 2010, and then continue typing menu key sequence i p s on your keyboard, and it will display the Insert Picture from Scanner or Camera dialog.
After typing Alt first and i key, you will see a Super Tip as follows:
After typing p and s key, it will pop up the Insert Picture from Scanner or Camera dialog.
Then you can choose picture from the device through the Insert Picture from Scanner or Camera dialog.
Insert picture from scanner or camera in Word by creating Macro
1. Firstly, you should create a Macro for your Word document. Please click View > Macros > View Macros. See screenshot:
2. After clicking View Macros, there will be a Macros dialog popping up. Under Macro name, type in “Scan”; select Normal. dotm (globaltemplate) from the Macros in drop-down list. Then click Create. See screenshot:
3. And now, a Microsoft Visual Basic for Applications window shows up, please copy and paste the following code to the dialog locates between Sub scan and End sub lines.
Code in 2013 and later version:
On Error Resume Next
Dim objCommonDialog As WIA.CommonDialog
Dim objImage As WIA.ImageFile
Set objCommonDialog = New WIA.CommonDialog
Set objImage = objCommonDialog.ShowAcquireImage
strDateiname = Environ("temp") & "\Scan.jpg"
If Not objImage Is Nothing Then
Set objImage = Nothing
Set objCommonDialog = Nothing
Code in 2007 and 2010:
On Error Resume Next
4. Now, you should click Tools > References to go to the References-Normal dialog box, then choose and check Microsoft Windows Image Acquisition Library option, see screenshot:
5. Then click OK to close the dialog box, and now, please press F5 key to run this code.
Note: Make sure the scanner is on and connected to the computer
Insert picture from scanner or camera in Word with Kutools for Word
With Kutools for Word’s From Scanner or Camera utility, you can get rid of those annoying operations and easily insert picture from scanner or camera in word.
Kutools for Word: with more than 100 handy Word add-ins, free to try with no limitation in 60 days.
Add reference to Microsoft Windows Image Acquisition x2.0
Sub Scan() Dim objCommonDialog As WIA.CommonDialog Dim objImage As WIA.ImageFile Dim strScanName As String ' instantiate Scan WIA objects Set objCommonDialog = New WIA.CommonDialog Set objImage = objCommonDialog.ShowAcquireImage strScanName = Environ$("TEMP") & "\Scan.jpg" ' set temporary file If Not objImage Is Nothing Then If Dir(strScanName) "" Then Kill strScanName objImage.SaveFile strScanName 'save into temp file DoEvents 'Word Selection.InlineShapes.AddPicture strScanName ' insert in doc End If End Sub
So I created a Macro using the code you supplied, thank you, i was wondering if there was a way to go further and include code for the selection that you make once that Insert Image window pops up. Thanks