Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-18-2012, 12:03 PM
joesmth1971 joesmth1971 is offline Address Action Button Windows XP Address Action Button Office 2003
Novice
Address Action Button
 
Join Date: Jul 2012
Posts: 5
joesmth1971 is on a distinguished road
Question Address Action Button

Say I send 20 emails a day to a specific person - e.g. John.Smith@yahoo.com. Now I can open a new mail message, and Outlook will auto-complete the address as soon as I start typing J..O....Etc.


But is it possible to add like an action button of sorts say where your tool bars are that would launch a new mail with John Smith's email already filled in when you click on it? I'd like to have a few of these buttons for the people or distribution lists I email the most. Another example would be a button named "Family" say that would launch a mail message with all my family members emails already filled in.
Reply With Quote
  #2  
Old 07-18-2012, 04:56 PM
niton niton is offline Address Action Button Windows 7 64bit Address Action Button Office 2012
Competent Performer
 
Join Date: Jul 2012
Posts: 102
niton is on a distinguished road
Default

Create an email with all the information entered.


 
To display the form from a button:

Sub DisplayFamilyForm()

Dim MyFolder
Dim myItem As MailItem

' create new outgoing message based on a form
Set MyFolder = Session.GetDefaultFolder(olFolderInbox)
Set myItem = MyFolder.items.Add("IPM.Note.Family")
myItem.Display

End Sub
Reply With Quote
  #3  
Old 07-19-2012, 04:40 AM
joesmth1971 joesmth1971 is offline Address Action Button Windows XP Address Action Button Office 2003
Novice
Address Action Button
 
Join Date: Jul 2012
Posts: 5
joesmth1971 is on a distinguished road
Default re.Address Button

Thanks for the reply Niton. Not sure, but is that some type of programming at the end of your reply - if so, I'm not really sure what to do there as I don't have programming experience.
Thanks.
Reply With Quote
  #4  
Old 07-26-2012, 09:13 AM
niton niton is offline Address Action Button Windows 7 64bit Address Action Button Office 2012
Competent Performer
 
Join Date: Jul 2012
Posts: 102
niton is on a distinguished road
Default

Once you have published a form named Family, paste the code into the VBA Editor.
http://www.slipstick.com/developer/h...ks-vba-editor/

Create a button as described here http://www.howto-outlook.com/howto/macrobutton.htm

Repeat as many times as needed with differently named forms. Replace the two instances of "Family" in the code with the diferent names.
Reply With Quote
  #5  
Old 07-26-2012, 11:13 AM
joesmth1971 joesmth1971 is offline Address Action Button Windows XP Address Action Button Office 2003
Novice
Address Action Button
 
Join Date: Jul 2012
Posts: 5
joesmth1971 is on a distinguished road
Default re. Address Action Button

Hi Nitton,

So here's where I'm at:

I successfully published a pre-designed Form with cetain email addreses to a folder in my Mailbox. I named the form 'Family' and named the Folder I created for it 'MyFolder'. I used "MyFolder' as I saw the VBA code you gave me referenced a 'MyFolder', so figured you meant me to use that as the folder name.

If I now click on this 'MyFolder' folder, and then go to 'Actions' on the tool bar, it shows a 'New Family' option in the menu and when I hit that it does launch an email with the email adresss I used when desinging the form pre-filled in - can't believe I even got this far!

I then pasted the code you gave me in the VBA editor and hit F5 to run - it launches a mail message, but just a blank one, not the 'Family' one I was hopoing it would.
I did go ahead and create the button on the toolbar as instructed, but this does nothing when I click it either. The button has the title 'Project1.ThisOutlookSession.DisplayFamilyForum' and does not let me edit the title when i right click on it.

Any ideas?

Again - thanks so much for the help!
Reply With Quote
  #6  
Old 07-26-2012, 11:17 AM
joesmth1971 joesmth1971 is offline Address Action Button Windows XP Address Action Button Office 2003
Novice
Address Action Button
 
Join Date: Jul 2012
Posts: 5
joesmth1971 is on a distinguished road
Default re-address button

Quick additional update - opened the VBA Editor and hit F5 again and I get an message that "The macros in this project are disabled. Please refer to the online help or documentation of the host application to determine how to enable macros"
Reply With Quote
  #7  
Old 07-26-2012, 01:17 PM
niton niton is offline Address Action Button Windows 7 64bit Address Action Button Office 2012
Competent Performer
 
Join Date: Jul 2012
Posts: 102
niton is on a distinguished road
Default

If macros are disabled see here http://www.slipstick.com/developer/h...ks-vba-editor/ about your security settings.

MyFolder is the short name for Session.GetDefaultFolder(olFolderInbox).

Since you did not publish to the Personal Forms Library, by accident you now have a menu choice when in a folder called "MyFolder".

If you want the macro to work point to the "Myfolder" folder.

Replace

Set myItem = MyFolder.items.Add("IPM.Note.Family")

with

Set myItem = MyFolder.Folders("MyFolder").items.Add("IPM.Note.F amily")

Edit: There is no space in Family above. I cannot remove it. Seems to be a glitch in the post.

No idea why you cannot edit your toolbar button. Perhaps it will work when you set your security to medium.
Reply With Quote
  #8  
Old 07-26-2012, 01:55 PM
joesmth1971 joesmth1971 is offline Address Action Button Windows XP Address Action Button Office 2003
Novice
Address Action Button
 
Join Date: Jul 2012
Posts: 5
joesmth1971 is on a distinguished road
Default

Wow - saved the Form to the Personal Forms Library instead and it is working! One thing though - when I try to add another macro in VBA (replacing 'Family' say with 'Friends') - the initial 'Family' macro dissapears. I'm sure it's something silly - but how do you save multiple macros?
Reply With Quote
  #9  
Old 08-01-2012, 05:30 AM
niton niton is offline Address Action Button Windows 7 64bit Address Action Button Office 2012
Competent Performer
 
Join Date: Jul 2012
Posts: 102
niton is on a distinguished road
Default

Copy the entire macro. Paste under the original. Do the replacing in the copy.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Action button to specific place in slide caz46 PowerPoint 5 03-16-2012 10:18 AM
How to attach an action to a hyperlink tapty PowerPoint 0 01-27-2012 05:25 AM
Action button triggered with remote clicker? LDC PowerPoint 0 01-11-2012 11:43 AM
Address Action Button Selection doesn't contain the action Ulodesk Word VBA 2 10-21-2011 05:59 AM
How to link an action on one slide on a powerpoint with the same action on another slevinmj PowerPoint 0 02-24-2011 05:38 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:23 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft