Creating shortcuts and shortcut groups with VBA?

  • Thread starter Thread starter Jeff Kowalczyk
  • Start date Start date
J

Jeff Kowalczyk

I've been googling for two days to see if I can find this out on my own,
but the common uses of 'groups' and 'shortcuts' is clouding the search.

Is there a VBA appliction object in Access 2002 that will allow me to
create shortcuts (and groups for shortcuts) as I iterate over my
querydefs? There does not seem to be a macro command. There is a menu
command, so I would expect VBA automation to be able to touch it.

I'm referring to the internal groupings you can create in Access, not
Windows/Internet favorites.

Thanks for any information.
 
Hi Jeff,

There is no Object Model for the Groups/shortcuts and therefore no easy way
to deal with them programmatically; however, we can simulate the menu
action; perhaps that does some help to your problem:

Sample code
========

' Add the Employes table to the group "MYGROUP", MYGROUP is the group
just below favorites

DoCmd.SelectObject acTable, "Employees", True

' Shift+F10 will drop the context menu

' AA to get to Add to Group

' {RIGHT} to expand the sub menu

' 2 because the group you are creating is the second group.

SendKeys "+{F10}AA{RIGHT}2", True

' Add the myReport report to the group

DoCmd.SelectObject acReport, "MyReport", True

SendKeys "+{F10}AA{RIGHT}2", True

MsgBox "The shortcuts have been created."

Please feel free to reply to the threads if you have any concerns or
question.



Sincerely,

Alick Ye, MCSD
Product Support Services
Microsoft Corporation
Get Secure! - <www.microsoft.com/security>

This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
| From: Jeff Kowalczyk <[email protected]>
| Subject: Creating shortcuts and shortcut groups with VBA?
|
| I've been googling for two days to see if I can find this out on my own,
| but the common uses of 'groups' and 'shortcuts' is clouding the search.
|
| Is there a VBA appliction object in Access 2002 that will allow me to
| create shortcuts (and groups for shortcuts) as I iterate over my
| querydefs? There does not seem to be a macro command. There is a menu
| command, so I would expect VBA automation to be able to touch it.
|
| I'm referring to the internal groupings you can create in Access, not
| Windows/Internet favorites.
|
| Thanks for any information.
|
|
 
Back
Top