Macro for a 'Go to Top' button

V

Victor Delta

I wonder if someone can help me with something that is proving more
difficult than I originally thought it would be?!

I receive a lot of html emails with contents lists at the top that use
hyperlink bookmarks. When using these I would often find it handy to have a
'Go to Top' button to enable me to jump back to the top of the page. Using
the 'customise' facility (in Outlook 2003) I thought I might be able to add
such a button but I cannot find one.

I presume I therefore need an appropriate macro - which simulates pressing
the Home key (which is the appropriate shortcut) - to which I can link a
toolbar button. I have tried creating such a macro using Word but it will
not work in Outlook.

I wonder therefore if anyone could kindly help me with the correct Outlook
macro code?

Many thanks.
 
M

Michael Bednarek

I wonder if someone can help me with something that is proving more
difficult than I originally thought it would be?!

I receive a lot of html emails with contents lists at the top that use
hyperlink bookmarks. When using these I would often find it handy to have a
'Go to Top' button to enable me to jump back to the top of the page. Using
the 'customise' facility (in Outlook 2003) I thought I might be able to add
such a button but I cannot find one.

I presume I therefore need an appropriate macro - which simulates pressing
the Home key (which is the appropriate shortcut) - to which I can link a
toolbar button. I have tried creating such a macro using Word but it will
not work in Outlook.

I wonder therefore if anyone could kindly help me with the correct Outlook
macro code?

As far as I know, there are no Visual Basic methods available to
navigate through a message (I'm firmly against useing SendKeys, so I'm
not going to recommend anything in that vein.)

I may misunderstand your request, but why is pressing the Home key not a
suitable solution?
 
V

Victor Delta

"Michael Bednarek" wrote in message

I wonder if someone can help me with something that is proving more
difficult than I originally thought it would be?!

I receive a lot of html emails with contents lists at the top that use
hyperlink bookmarks. When using these I would often find it handy to have a
'Go to Top' button to enable me to jump back to the top of the page. Using
the 'customise' facility (in Outlook 2003) I thought I might be able to add
such a button but I cannot find one.

I presume I therefore need an appropriate macro - which simulates pressing
the Home key (which is the appropriate shortcut) - to which I can link a
toolbar button. I have tried creating such a macro using Word but it will
not work in Outlook.

I wonder therefore if anyone could kindly help me with the correct Outlook
macro code?

As far as I know, there are no Visual Basic methods available to
navigate through a message (I'm firmly against useing SendKeys, so I'm
not going to recommend anything in that vein.)

I may misunderstand your request, but why is pressing the Home key not a
suitable solution?

--
Michael Bednarek "POST NO BILLS"

----------------------------------------------------------------------

I have been advised that it can be done - hence my request.

Pressing the Home key is not really an option for ergonomic reasons - I want
to be able to jump to the top without having to move my hand from the mouse.
This may sound trivial but if one is doing the move repeatedly it does add
up.

V
 
M

Michael Bednarek

I have been advised that it can be done - hence my request.

Pressing the Home key is not really an option for ergonomic reasons - I want
to be able to jump to the top without having to move my hand from the mouse.
This may sound trivial but if one is doing the move repeatedly it does add
up.
(You should investigate how to teach your Usenet client how to use
proper message quoting.)

Please let us know if you find anything; it would be most interesting.
As for ergonomics: I found that if I train our staff in methods which
keep their hands away from the mouse and firmly on the keyboard, it
increases productivity and improves their shoulder muscle activity and
wrist posture.
 
V

Victor Delta

Found a solution at last. Put this in a macro and it works just fine:

Interaction.SendKeys ("{HOME}")

Mission accomplished!


"Michael Bednarek" wrote in message

I have been advised that it can be done - hence my request.

Pressing the Home key is not really an option for ergonomic reasons - I
want
to be able to jump to the top without having to move my hand from the
mouse.
This may sound trivial but if one is doing the move repeatedly it does add
up.
(You should investigate how to teach your Usenet client how to use
proper message quoting.)

Please let us know if you find anything; it would be most interesting.
As for ergonomics: I found that if I train our staff in methods which
keep their hands away from the mouse and firmly on the keyboard, it
increases productivity and improves their shoulder muscle activity and
wrist posture.
 
M

Michael Bednarek

Found a solution at last. Put this in a macro and it works just fine:

Interaction.SendKeys ("{HOME}")

Mission accomplished!

As I wrote earlier: "I'm firmly against using SendKeys, so I'm not going
to recommend anything in that vein." It's an abomination, doesn't
deserve to be called "VBA programming", and will sooner or later fail.
Good luck.
 

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