VBA shortcut to open custom form in design mode?

B

Burma Jones

There is a custom form that I modify frequently and I was wondering if there is any way to programmatically open the form in design mode? Currently I have to go Tools -> Forms -> Design a Form -> Personal Forms Library -> select the form (or double-click) -> Open

Thanks
 
M

Michael Bauer

Am Fri, 3 Mar 2006 20:40:05 -0800 schrieb Burma Jones:

If the Form is published then you should have a button for it in the Actions
menu.

--
Viele Gruesse / Best regards
Michael Bauer - MVP Outlook
-- www.vbOffice.net --

There is a custom form that I modify frequently and I was wondering if
there is any way to programmatically open the form in design mode?
Currently I have to go Tools -> Forms -> Design a Form -> Personal Forms
Library -> select the form (or double-click) -> Open
 
S

Sue Mosher [MVP-Outlook]

The form will appear on the Actions menu only if you publish it to a folder, and even that won't open it in design mode. Instead, Burma would need to:

1) use the Add method on a target folder's Items collection to create a new item using the form
2) display the item
3) use CommandBars techniques to execute the Tools | Forms | Design This Form command (see http://www.outlookcode.com/d/tips/commandbarfun.htm

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003

and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
B

Burma Jones

What I ended up doing is to use an AutoIT script to do a Sendkeys action:

Sub DesignCustomForm()

Dim RetVal

RetVal = Shell("""C:\Program Files\AutoIt3\AutoIt3.exe"" ""C:\DesignCustomForm.au3""")
SendKeys "%(tfe)"

End Sub

AutoIT script (DesignCustomForm.au3):

WinWaitActive("Design Form")
Opt("SendKeyDelay", 200)
Send("{DOWN}")
Send("{ENTER}")
Exit
There is a custom form that I modify frequently and I was wondering if there is any way to programmatically open the form in design mode? Currently I have to go Tools -> Forms -> Design a Form -> Personal Forms Library -> select the form (or double-click) -> Open

Thanks
 
F

FABIODIAS

Here My Friends,

Only 1 line !
CommandBars("Visual Basic").Controls(6).Execute

Regards,
Fabio Dias S.
 
Top