Help wanted to create a macro in new appointment window

  • Thread starter Thread starter Marc Mendez
  • Start date Start date
M

Marc Mendez

Hi,

I need help to create a macro on a new appointment window; Here is my
problem :
I create as usual an appointment. I want to add a button (associated with a
macro), which ask me for a number.
Then, it adds in the body of the appointment an hyperlink (such as
http://www.site.com/xxxx, where xxxx stands for the value I entered). That's
all.
I've already made macro for Word, but, for Outlook, I don't have all the
documentation to make this one.
so, if somebody can help me ...;

Thanks a lot !
 
Hi Marc,

you do have all the documentation. It´s all in the VBA help and a very
good entry for this is the Objectbrowser - not only for Word, but also
for Outlook :-)

For adding a CommandBar you can use ActiveInspector.CommandBars.Add. For
trapping a new opened Inspector use the NewInspector event.

For the query you can create a UserForm or use a simple InputBox like
this:

Dim sInput as String
sInput=InputBox("Please enter a number:")
if len(sInput) and IsNumeric(sInput) Then
' a number was entered
Endif

and join your link with the input:

Dim sLink as String
sLink="<http://www.site.com/" & sinput & ">"

This inserts the link into the body: YourAppointmentItem.Body=sLink
 
Back
Top