Insert a picture from a webcam

C

charles92027

There is an option to insert a picture from a camera, but it doesn't seem to
recognize the webcam that's built in to my laptop. It records video just
fine, but it would be incredibly useful for me to be able to take a picture
with my webcam straight into onenote.
 
D

dgmacmi

charles92027 said:
There is an option to insert a picture from a camera, but it doesn't seem
to
recognize the webcam that's built in to my laptop. It records video just
fine, but it would be incredibly useful for me to be able to take a
picture
with my webcam straight into onenote.

I tried the following in OneNote 2007.

Open OneNote 2007
Select Options from the Tools menu. Select Audio and Video as select your
webcam as the default device.
Select the page you want the video.
From the insert menu select Video Recording.

The result was a video recording from my webcam. The recording included
audio, but the audio quality in my experiment was poor. Sorry I did not have
time today to try to improve the audio. Anyway, a place to start if you do
not receive a better response.

Don
 
C

charles92027

I don't have a problem inserting video, that seems to work fine, it's just
not what I need.
I would like to take a still picture with my webcam directly into OneNote.
The menu says:
Insert->picture->From Scanner or Camera
But when I select that it says there is no device, but there obviously is a
device, I just recorded video with it.
 
D

dgmacmi

Sorry, I did not understand your post.

Insert picture function is looking for a compatible image file on your
computer, in your camera or one created with your scanner. The output of
your webcam is a video file not an image file.

As far as I know, the only way to insert an webcam image into OneNote is to
first to extract the image from an existing webcam recording or to capture
an image from the webcam in a compatible image file {such as jpg} and then
insert the image into OneNote. I have applications that can extract or
capture. No one step procedure.

Don
 
C

charles92027

I wrote this VBA macro that allows me to take a picture with a webcam and
place it on the clipboard. It runs fine in Excel, but I can't figure out how
to get a VBA macro into OneNote


Option Explicit

Const WM_CAP As Long = &H400
Const WM_CAP_DRIVER_CONNECT As Long = WM_CAP + 10
Const WM_CAP_DRIVER_DISCONNECT As Long = WM_CAP + 11
Const WM_CAP_EDIT_COPY As Long = WM_CAP + 30
Const WS_CHILD As Long = &H40000000
Const WS_VISIBLE As Long = &H10000000

Declare Function SendMessage Lib "User32" Alias "SendMessageA" _
(ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As
Any) As Long

Declare Function DestroyWindow Lib "User32" (ByVal hndw As Long) As Boolean

Declare Function capCreateCaptureWindowA Lib "avicap32.dll" _
(ByVal lpszWindowName As String, ByVal dwStyle As Long, ByVal x As Long,
ByVal y As Long, ByVal nWidth As Long, _
ByVal nHeight As Integer, ByVal hWndParent As Long, ByVal nID As
Long) As Long

Declare Function capGetDriverDescriptionA Lib "avicap32.dll" _
(ByVal wDriver As Integer, ByVal lpszName As String, _
ByVal cbName As Long, ByVal lpszVer As String, ByVal cbVer As Long)
As Boolean

Declare Function GetDesktopWindow Lib "User32" () As Long

Sub WebCamClip()

Dim strName As String
Dim strVer As String
Dim hwnd As Long
Dim iDevice As Long

iDevice = 0
strName = Space(100)
strVer = Space(100)

If capGetDriverDescriptionA(iDevice, strName, 100, strVer, 100) Then

hwnd = capCreateCaptureWindowA(iDevice, WS_CHILD, 0, 0, 640, 480,
GetDesktopWindow(), 0)

If hwnd Then

SendMessage hwnd, WM_CAP_DRIVER_CONNECT, iDevice, 0
SendMessage hwnd, WM_CAP_EDIT_COPY, 0, 0
SendMessage hwnd, WM_CAP_DRIVER_DISCONNECT, iDevice, 0

DestroyWindow hwnd
End If
End If


End Sub
 
R

Rainald Taesler

charles92027 said:
I wrote this VBA macro that allows me to take a picture with a webcam
and place it on the clipboard. It runs fine in Excel, but I can't
figure out how to get a VBA macro into OneNote

ON does not work with VBA macros.

You would have to write something using the ON-API.

Rainald
 
B

Basha

Hi,

I am working on same kind of requirement, Are you working Web Application or a Windows application.

Thank You.
Regards,
Basha




Rainald Taesler wrote:

charles92027 wrote:ON does not work with VBA macros.
25-Jan-10

charles92027 wrote

ON does not work with VBA macros

You would have to write something using the ON-API

Rainald

Previous Posts In This Thread:

Insert a picture from a webcam
There is an option to insert a picture from a camera, but it does not seem t
recognize the webcam that is built in to my laptop. It records video jus
fine, but it would be incredibly useful for me to be able to take a pictur
with my webcam straight into onenote.

I tried the following in OneNote 2007.
I tried the following in OneNote 2007

Open OneNote 200
Select Options from the Tools menu. Select Audio and Video as select you
webcam as the default device
Select the page you want the video
From the insert menu select Video Recording

The result was a video recording from my webcam. The recording include
audio, but the audio quality in my experiment was poor. Sorry I did not hav
time today to try to improve the audio. Anyway, a place to start if you d
not receive a better response

Don

I do not have a problem inserting video, that seems to work fine, it is
I do not have a problem inserting video, that seems to work fine, it is jus
not what I need
I would like to take a still picture with my webcam directly into OneNote
The menu says
Insert->picture->From Scanner or Camer
But when I select that it says there is no device, but there obviously is
device, I just recorded video with it

:

Sorry, I did not understand your post.
Sorry, I did not understand your post

Insert picture function is looking for a compatible image file on you
computer, in your camera or one created with your scanner. The output o
your webcam is a video file not an image file

As far as I know, the only way to insert an webcam image into OneNote is t
first to extract the image from an existing webcam recording or to captur
an image from the webcam in a compatible image file {such as jpg} and the
insert the image into OneNote. I have applications that can extract o
capture. No one step procedure

Don

I wrote this VBA macro that allows me to take a picture with a webcam andplace
I wrote this VBA macro that allows me to take a picture with a webcam an
place it on the clipboard. It runs fine in Excel, but I cannot figure out ho
to get a VBA macro into OneNot

Option Explici

Const WM_CAP As Long = &H40
Const WM_CAP_DRIVER_CONNECT As Long = WM_CAP + 1
Const WM_CAP_DRIVER_DISCONNECT As Long = WM_CAP + 1
Const WM_CAP_EDIT_COPY As Long = WM_CAP + 3
Const WS_CHILD As Long = &H4000000
Const WS_VISIBLE As Long = &H1000000

Declare Function SendMessage Lib "User32" Alias "SendMessageA"
(ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam A
Any) As Lon

Declare Function DestroyWindow Lib "User32" (ByVal hndw As Long) As Boolea

Declare Function capCreateCaptureWindowA Lib "avicap32.dll"
(ByVal lpszWindowName As String, ByVal dwStyle As Long, ByVal x As Long
ByVal y As Long, ByVal nWidth As Long,
ByVal nHeight As Integer, ByVal hWndParent As Long, ByVal nID A
Long) As Lon

Declare Function capGetDriverDescriptionA Lib "avicap32.dll"
(ByVal wDriver As Integer, ByVal lpszName As String,
ByVal cbName As Long, ByVal lpszVer As String, ByVal cbVer As Long
As Boolea

Declare Function GetDesktopWindow Lib "User32" () As Lon

Sub WebCamClip(

Dim strName As Strin
Dim strVer As Strin
Dim hwnd As Lon
Dim iDevice As Lon

iDevice =
strName = Space(100
strVer = Space(100

If capGetDriverDescriptionA(iDevice, strName, 100, strVer, 100) The

hwnd = capCreateCaptureWindowA(iDevice, WS_CHILD, 0, 0, 640, 480
GetDesktopWindow(), 0)

If hwnd Then

SendMessage hwnd, WM_CAP_DRIVER_CONNECT, iDevice, 0
SendMessage hwnd, WM_CAP_EDIT_COPY, 0, 0
SendMessage hwnd, WM_CAP_DRIVER_DISCONNECT, iDevice, 0

DestroyWindow hwnd
End If
End If


End Sub





:

charles92027 wrote:ON does not work with VBA macros.
charles92027 wrote:

ON does not work with VBA macros.

You would have to write something using the ON-API.

Rainald


Submitted via EggHeadCafe - Software Developer Portal of Choice
Server Side Processing in ADO.NET/WCF Data Services
http://www.eggheadcafe.com/tutorial...f-4f6f92a76585/server-side-processing-in.aspx
 
S

sohail.akhtar.ptv

There is an option to insert a picture from a camera, but it doesn't seem to
recognize the webcam that's built in to my laptop. It records video just
fine, but it would be incredibly useful for me to be able to take a picture
with my webcam straight into onenote.

Dear Sir

I have a Excel sheet with the button Insert picture.
I want when I will click this button picture will take from webcam and paste this picture same time in excel cell.

I have try the above code but its not working
Please help me regarding this
Thanks
sohail Akhtar
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top