shortcut

J

Joel Allen

Hello,

I have a custom form with code. Is there a way to make a Desktop shortcut,
or a button in Outlook that will open the form?

I tried saving a copy of the form (as an .oft file) - the form opened but
the code did not run.

Any idea?

Thanks,
Joel
 
H

Hollis Paul

I tried saving a copy of the form (as an .oft file) - the form opened but
the code did not run.

Any idea?
It is by design that code does not run when a form is opened from a .oft
file. You need to publish it to your Exchange Organization Forms Library,
or the personal forms library in your Outlook .pst file, and then run it
from Outlook. If it is a .oft file, it is not trusted. If it is a
published form, then it is a trusted object, and the code will run.
 
J

Joel Allen

Thanks Paul. I have it published, and everything works ok. But how can I
make a shortcut to open up the form? I don't want to click File, New,
Choose Form..... I have many forms that I use, so it would be nice to have
shortcuts.

Thanks again for your help,
Joel
 
H

Hollis Paul

Thanks Paul. I have it published, and everything works ok. But how can I
make a shortcut to open up the form? I don't want to click File, New,
Choose Form..... I have many forms that I use, so it would be nice to have
shortcuts.
It depends what you want the forms to do. I have a bunch of action forms that
I open up to run some code behind the form. These I give a name that begins
with a number so they sit at the very beginning of default folder of that
type. When I close the form I opened to run code, I don't save any changes
that may have been made programmatically to the form.

You can also add custom buttons to custom toolbars and run them as add-ins to
Outlook. However, you have to have the knowledge of how to create COM Add-ins
with Visual Studio, have Visual Studio itself, and know a dot net programming
language, and how to get an add-in working. There are many custom add-ins
available for purchase which may do the trick. Go to www.slipstick.com and
browse through the utilities section.

Another thing you can do is write a macro that opens your desired form, give
it a recognizable name and run it from the GUI behind the Alt-F8 key. I have
an example of this in a Office Automation Example located at this URL:

Automating Tip Capture with Office Systems 2003 - Part 2
http://msmvps.com/blogs/obts/archive/2005/10/19/71693.aspx
 
J

Joel Allen

Thanks Sue. This actually just opened up a standard task. My custom form
is in one of the public folders. Am I doing something wrong? It works for
one of my other custom forms (which is the default form) but not for the
form called ProfilitDocuments.

"C:\Program Files\Microsoft Office\OFFICE11\OUTLOOK.EXE" /c
"IPM.Task.ProfilitDocuments"

Thanks, Joel

Use the /c switch with outlook.exe. See
http://www.outlookcode.com/article.aspx?id=56
 
S

Sue Mosher [MVP-Outlook]

The only thing you've done wrong is neglect to tell us that this was a form published in a public folder. You can't use a simple shortcut to launch such a form. You can, however, display that folder and launch the form from its Actions menu.
 

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