Transfer Calculator Result

E

Ed

I know how to display the Microsoft calculator in Word.

MS says that a two step 'Copy/Paste' operation is the only way to capture
the result of a calculation. Is there any way via VBA to more directly
capture the answer and automatically get the calculator's answer into the
document or into a form field (by clicking one button, for example)?

Thanks,

Ed (in Virginia)
 
D

Doug Robbins - Word MVP

I don't believe that the calculator exposes itself to the use of VBA. You
could however use vba to ask the use for the inputs to the calculation and
to perform the calculation.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
J

Jezebel

or use the dreaded SendKeys



Doug Robbins - Word MVP said:
I don't believe that the calculator exposes itself to the use of VBA. You
could however use vba to ask the use for the inputs to the calculation and
to perform the calculation.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
H

Helmut Weber

Hi Ed,

Ctrl c copies the calculator's result,
or whatever is displayed to the clipboard.
As you have to type into the calculator anyway,
it's just one keystroke more.

To read from the clipboard programmatically,
google for dataobject, getfromclipboard, gettext

HTH
 
J

Jay Freedman

Helmut said:
Hi Ed,

Ctrl c copies the calculator's result,
or whatever is displayed to the clipboard.
As you have to type into the calculator anyway,
it's just one keystroke more.

To read from the clipboard programmatically,
google for dataobject, getfromclipboard, gettext

HTH

Or start with
http://www.word.mvps.org/FAQs/MacrosVBA/ManipulateClipboard.htm.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.
 

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