How to use VBA code in VB for Insert Picture from Scanner Command?
I am trying to use the menu item from MS Word 2003:
Insert > Picture > From Scanner or Camera
I would like to be able to pull up this dialog box through a code using a Visual Basic .NET application. I recorded a macro and got the following syntax when using the menu item:
VB Code:
WordBasic.InsertImagerScan()
However, the Visual Studio IDE complains that "Name 'WordBasic is not declared". I am coding this in Visual Basic because I am creating a that uses the new Visual Studio Tools for Office application.
If for some reason this command is not supported in VBA, is there an easy way to use sendkeys?
Any help would be appreciated.
Thanks,
Brian
Re: How to use VBA code in VB for Insert Picture from Scanner Command?
I am trying to accomplish the same thing using Excel 2003. Any help out there?
Thanks in advance!
Re: How to use VBA code in VB for Insert Picture from Scanner Command?
Users..
I had the problem but worked it out with xp plus access and word 2003
Works sweet
You can use it to open a document or open a new document.
It will open word,start the scanner camera wizard from xp
All you do is to click on the “insert” button on the below form
It will open your document and then insert the scanned document.
It will then save the new document as you define below.
It will then close the wizard and ms word 2003
Hope this helps you and others..
Send it to whoever has this problem
Joe archer sr
San diego ca
Private Sub Command779_Click()
On Error GoTo Err_Command779_Click
Dim oApp As Object
Dim oWord As Object
Set oApp = CreateObject("Word.Application")
'Set oWord = oApp.Documents.Open(FileName:="C:\Wreck Check PDF Documents\Assessment_Scanned_Info.doc") ' TO OPEN specific word document
Set oWord = oApp.Documents.Add()
oApp.Visible = True
oApp.WordBasic.InsertImagerScan ' WILL OPEN SCANNER camera WIZARD, JUST CLICK ON "insert" button
Dim finalRptName As String
finalRptName = "Assessment No" & " " & Me.Combo548 & ".DOC"
oWord.SaveAs ("C:\Wreck Check PDF Documents\_Scanned_Info" & finalRptName) 'PATH AND NAME OF .DOC YOUR WANT
oApp.Quit ' WILL CLOSE THE WORD DOCUMENT AND WORD AND RETURN YOU TO ACCESS FORM
Exit_Command779_Click:
Exit Sub
Err_Command779_Click:
MsgBox Err.Description
Resume Exit_Command779_Click
End Sub