Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Insert a picture from a webcam

2,873 views
Skip to first unread message

charles92027

unread,
Jan 12, 2010, 12:45:01 PM1/12/10
to
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.

dgmacmi<>

unread,
Jan 12, 2010, 2:24:26 PM1/12/10
to
"charles92027" <charle...@discussions.microsoft.com> wrote in message
news:882522AE-B342-49D8...@microsoft.com...

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

charles92027

unread,
Jan 13, 2010, 1:08:01 PM1/13/10
to
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.

"dgmacmi<>" wrote:

> .
>

dgmacmi<>

unread,
Jan 13, 2010, 2:01:24 PM1/13/10
to
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

"charles92027" <charle...@discussions.microsoft.com> wrote in message

news:A4480AB7-1100-40EF...@microsoft.com...

charles92027

unread,
Jan 22, 2010, 12:51:32 AM1/22/10
to

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

"dgmacmi<>" wrote:

> .
>

Rainald Taesler

unread,
Jan 25, 2010, 7:49:13 AM1/25/10
to
charles92027 wrote:
> 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

Basha

unread,
Jun 1, 2010, 9:51:30 AM6/1/10
to
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:

On Tuesday, January 12, 2010 12:45 PM
charles92027 wrote:

Insert a picture from a webcam
There is an option to insert a picture from a camera, but it does not seem to
recognize the webcam that is 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.

On Tuesday, January 12, 2010 2:24 PM
dgmacmi wrote:

I tried the following in OneNote 2007.
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

On Wednesday, January 13, 2010 1:08 PM
charles92027 wrote:

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 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.

"dgmacmi<>" wrote:

On Wednesday, January 13, 2010 2:01 PM
dgmacmi wrote:

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 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

On Friday, January 22, 2010 12:51 AM
charles92027 wrote:

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 and

place it on the clipboard. It runs fine in Excel, but I cannot figure out how


to get a VBA macro into OneNote


Option Explicit

Sub WebCamClip()

If hwnd Then


End Sub

"dgmacmi<>" wrote:

On Monday, January 25, 2010 7:49 AM
Rainald Taesler wrote:

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/tutorials/aspnet/db179aed-47fa-4f86-a4bf-4f6f92a76585/server-side-processing-in.aspx

sohail.a...@gmail.com

unread,
Aug 26, 2013, 11:18:25 AM8/26/13
to
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
0 new messages