how to add a button to the toolbar using VFP9 (Foxpro)

R

Rick

I want to add a button to the main toolbar programmatically using VFP9. I
also want the button to save the active document when the button is clicked.
It would be nice to be able to set the path in code as well!
 
C

Cindy M.

Hi Rick,
I want to add a button to the main toolbar programmatically using VFP9. I
also want the button to save the active document when the button is clicked.
It would be nice to be able to set the path in code as well!
This newsgroup is for VBA, so you'd get VBA code. And given that you'd need to
set up and use the CommandBarButton's Click event, you're not likely to get much
of what you need, here. (VBA doesn't need to set up the Click event for a
button.)

I think you can save yourself some work and frustration if you ask in a group
the targets Visual Foxpro. Quite a few of them have experience with the word
object model and could probably point you to code examples in that language.
Tamar Granor, especially, comes to mind, and she's written a pretty good book on
the subject "Microsoft Office Automation with Visual FoxPro".

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or reply
in the newsgroup and not by e-mail :)
 
C

Cindy M.

Hi =?Utf-8?B?Umljaw==?=,
We can insert VBA code into VFP - I think we need the VBA code to do this.
No, you don't. VBA code *linkage* (OnAction property) for the
CommandBarButton only works with VBA code in an Office VBA project. For code
automating Office from outside an Office VBA project you must use the Click
event. Most folks in this newsgroup never set up Click events for toolbar
buttons.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :)
 

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