The light at the end of the tunnel...

J

Jerry Camel

Okay... I've got a beautiful report in excel being generated from a list of
custom forms posted into a public folder... Now, is there a way to
distribute this macro and have a button added to a user's toolbar?

I have no issue creating an "Install" app that does this, but I don't know
if you can automate the process of creating a macro and assigning it to a
toolbar button. (With a custom icon, too!) :eek:)

If someone can point me to some samples or something, that'd be awesome.

Jerry
 
S

Sue Mosher [MVP-Outlook]

Outlook macros are not designed to be "distributed" in the way that macros
for document-centric programs like Word and Excel are.

You have several options:

1) You can export the module in which the macro appears, and give it to
other people with instructions on how to import it.

2) You could adapt the code to VBScript and put it in a form that's
published in that same public folder. People could then choose Actions | New
My Report (if you published the form with the display name "My Report") and
click a button on the form to run your report.

3) Build a COM add-in and install it on every machine.

I'd go with #2, since you already have a folder-centric application.
 
J

Jerry Camel

I had considered the second option. Just don't like it because you'd have
to open a single item to generate a report for the entire folder. Just not
that user friendly to me. I'll most likely write up some docs for
installation and distribute the .bas. Thanks for your response.
 
S

Sue Mosher [MVP-Outlook]

I think it's infinitely user friendly. You don't even need to show the item.
Cancel Item_Open after the report runs.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 
H

Hollis D. Paul

I had considered the second option. Just don't like it because you'd have
to open a single item to generate a report for the entire folder. Just not
that user friendly to me. I'll most likely write up some docs for
installation and distribute the .bas. Thanks for your response.
Actually, the form that you use to kick off the report generation doesn't
have to be one of the set of data items you are reporting about. It just has
to run the code that looks up all the other items. At one time these were
called Action Items, and if you gave them a name that began with a numeric
character--like 0_My_Action_Item, they would set as the first item displayed
in the folder, and you could easily find it, open the item, click the button,
the report would appear at the printer, and you close the Action Item.

Hollis D. Paul [MVP - Outlook]
(e-mail address removed)
Using Virtual Access 4.52 build 277 (32-bit), Windows 2000 build 2600
http://search.support.microsoft.com/kb/c.asp?FR=0&SD=TECH&LN=EN-US

Mukilteo, WA USA
 
J

Jerry Camel

Alright... I;m missing something. I said not user friednly because I
pictured adding a button to the current custom form, which would mean that
the user had to open one of the items in the folder in order to report on
all of the items. Not difficult, but not really intuitive.

But it sounds like you guys are thinking something else. With a different
form? There's a piece I'm missing. Perhaps I'm still not familiar enough
with Outlook forms, but I'm not sure how you work with the action items...
I'll have to play with that and see what I come up with. If you can point
me to more detail that'd be great. Thanks.

Jerry
 
S

Sue Mosher [MVP-Outlook]

Try this for yourself. Create a new Post form and don't change the UI. Put
this code in it:

Function Item_Open()
MsgBox "Your code to run a report could be running instead of this
prompt."
Item_Open = False
End Function

Publish the form to the public folder, then run it from the folder's Actions
menu. You should see the prompt without the form ever displaying.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 

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