Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / September 2006

Tip: Looking for answers? Try searching our database.

Transfer Calculator Result

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ed - 31 Aug 2006 03:36 GMT
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)
Doug Robbins - Word MVP - 31 Aug 2006 04:49 GMT
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.

Signature

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

>I know how to display the Microsoft calculator in Word.
>
[quoted text clipped - 6 lines]
>
>        Ed (in Virginia)
Jezebel - 31 Aug 2006 05:29 GMT
or use the dreaded SendKeys

>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
[quoted text clipped - 10 lines]
>>
>>        Ed (in Virginia)
Helmut Weber - 31 Aug 2006 12:38 GMT
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

Signature

Greetings from Bavaria, Germany
Helmut Weber, MVP WordVBA
"red.sys" & chr(64) & "t-online.de"
Word 2002, Windows 2000 (german versions)

Jay Freedman - 31 Aug 2006 15:01 GMT
> Hi Ed,
>
[quoted text clipped - 7 lines]
>
> HTH

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

Signature

Regards,
Jay Freedman
Microsoft Word MVP        FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.

Roy - 01 Sep 2006 09:10 GMT
Thanks, all. I know what I am going to do now.

-Ed
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.