OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

email button

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer
View previous topic :: View next topic  
Author Message
rhodestransit
Power User
Power User


Joined: 17 Mar 2011
Posts: 91

PostPosted: Tue May 08, 2012 5:57 am    Post subject: email button Reply with quote

I have been trying to find a way to add a button to different documents that will send the document to different email recipients.
I have 6 forms that will each have a button with different emails that the form needs to go to.
Is there a way of adding an email button and automatically adding the addresses?
Back to top
View user's profile Send private message
DVezina
OOo Advocate
OOo Advocate


Joined: 29 Sep 2006
Posts: 248
Location: Orlando

PostPosted: Tue May 08, 2012 9:39 am    Post subject: Reply with quote

First create OO macros for each email you want to launch.
Tools->Macros->Organize Macros->OpenOffice.org Basic


Code:

sub emailOne
sURL = convertToURL("mailto:sales@pub-link.com")
oSvc = createUnoService("com.sun.star.system.SystemShellExecute")
oSvc.execute(sURL,"",0)
end sub


Draw button on your page using the Forms Control toolbar.
View->Toolbars->Form Controls

Double click on your button and click on Events tab.

Assign your macro to the execute event
Back to top
View user's profile Send private message
rhodestransit
Power User
Power User


Joined: 17 Mar 2011
Posts: 91

PostPosted: Tue May 08, 2012 11:49 am    Post subject: Reply with quote

Thanks for the reply, how do i separate multiple email addresses in the macro?
If i try to create a different macro for each email it is just over writing the last one i saved
Back to top
View user's profile Send private message
floris_v
Moderator
Moderator


Joined: 12 Jul 2007
Posts: 4791
Location: Netherlands

PostPosted: Wed May 09, 2012 10:06 am    Post subject: Reply with quote

Save each macro with a different name.
_________________
LibreOffice 3.6.3; OOo 3.4.1 on Windows Vista
Join the Official community forum - in several languages, including Nederlandstalig forum
Back to top
View user's profile Send private message
rhodestransit
Power User
Power User


Joined: 17 Mar 2011
Posts: 91

PostPosted: Thu May 10, 2012 7:53 am    Post subject: Reply with quote

More questions,
I have the macro as above with one of the email addresses I need, I dont have an option to save it as a specific name, when i click file the "save as" option is shaded out.
However it is not doing anything when i click on my button, I have assigned the macro to the button.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Writer All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group