PC Review Forums Newsgroups Microsoft Outlook Microsoft Outlook VBA Programming Help wanted to create a macro in new appointment window

Reply

Help wanted to create a macro in new appointment window

 
Thread Tools Rate Thread
Old 03-03-2005, 03:27 PM   #1
Marc Mendez
Guest
 
Posts: n/a
Default Help wanted to create a macro in new appointment window


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 !



  Reply With Quote
Old 04-03-2005, 02:09 PM   #2
Michael Bauer
Guest
 
Posts: n/a
Default Re: Help wanted to create a macro in new appointment window

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

--
Viele Grüße
Michael Bauer


"Marc Mendez" <nomail@nomail.com> wrote in message
news:42272c3c$0$1225$8fcfb975@news.wanadoo.fr...
> 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 !
>
>
>


  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off