Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / July 2007

Tip: Looking for answers? Try searching our database.

Creating a button to send doc as email to fixed addy

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Ernest Lai - 28 Jun 2007 12:42 GMT
Good afternoon all,

I still searching google and the MS word help files but so far no joy.  I am
looking to create a button within my word document.  This button, on push
will automatically send the entire doc as an email attachment to a fixed
email address.

Any help is much appreciated, Thanks in advance!

Ernest
Ernest Lai - 28 Jun 2007 12:50 GMT
OK i think i may have found it thanks to the MVP site :)

going to use:

{ MACROBUTTON MyMacroName Double-Click To Run Macro }  

to run a macro and the macro will hopefully email it off to a fixed addy.  
ill post my results.
Ernest Lai - 28 Jun 2007 13:28 GMT
done using the MVP website.  Great resource site bookmarked.
clburrill - 13 Jul 2007 15:22 GMT
Did you find a response to this question?  I need assistance with the same
thing.  Can you assist me?

> Good afternoon all,
>
[quoted text clipped - 6 lines]
>
> Ernest
Ernest Lai - 13 Jul 2007 15:34 GMT
I found the answer on this website:

http://www.mvps.org/

cant remember where :P Sorry  but there is a website that has a guide

> Did you find a response to this question?  I need assistance with the same
> thing.  Can you assist me?
[quoted text clipped - 9 lines]
> >
> > Ernest
jerem - 21 Jul 2007 20:52 GMT
Good question and good answer, however, how do you get the macrobutton to
appear in the document but not print out when you print the document.  I want
a button that appears in the document but is invisible to the printer (and I
don't want to have to put a button on a toolbar).

> I found the answer on this website:
>
[quoted text clipped - 15 lines]
> > >
> > > Ernest
Russ - 21 Jul 2007 21:38 GMT
Jerem,
The trick is usually to format as hidden and make sure that the print hidden
option is off. In PrintPreview mode you shouldn't see it, if hidden.

See the section "Modifying the MacroButton Code"
<http://pubs.logicalexpressions.com/pub0009/LPMArticle.asp?ID=95>

> Good question and good answer, however, how do you get the macrobutton to
> appear in the document but not print out when you print the document.  I want
[quoted text clipped - 21 lines]
>>>>
>>>> Ernest

Signature

Russ

drsmN0SPAMikleAThotmailD0Tcom.INVALID

Russ - 21 Jul 2007 21:50 GMT
Jerem,
You can display or hide hidden objects to the user, but if the print option
is set correctly, it won't print even though the user sees it in normal
mode, although the user won't see it in PrintPreview.

For hidden font text you can toggle
The Main Toolbar Show/Hide Button (¶)

Or use VBA code:
ActiveWindow.ActivePane.View.ShowAll = Not ActiveWindow.ActivePane.View. _
       ShowAll
or
ActiveWindow.ActivePane.View.ShowAll = True 'or False

> Jerem,
> The trick is usually to format as hidden and make sure that the print hidden
[quoted text clipped - 28 lines]
>>>>>
>>>>> Ernest

Signature

Russ

drsmN0SPAMikleAThotmailD0Tcom.INVALID

Russ - 21 Jul 2007 22:02 GMT
Jerem,
It is polite to store the all the user's settings or options that you are
going to mess with and restore them at the end of your macro.
For example:

Dim theShowAll as Boolean

theShowAll = ActiveWindow.ActivePane.View.ShowAll
...
ActiveWindow.ActivePane.View.ShowAll = True' or False
...
ActiveWindow.ActivePane.View.ShowAll = theShowAll

> Jerem,
> You can display or hide hidden objects to the user, but if the print option
[quoted text clipped - 43 lines]
>>>>>>
>>>>>> Ernest

Signature

Russ

drsmN0SPAMikleAThotmailD0Tcom.INVALID

Ernest Lai - 23 Jul 2007 09:38 GMT
Hi all,

Sorry didnt have access to my work files while away.  This is the macro code
below:    I then used 'Toggle Field Codes' To turn a line of text into a on
click button to run the macro 'send_email'.  This isnt the full process but
at least you know what to look for on the MVP website.  Sorry for the half
info :) best of luck.

Ernest

Sub send_email()
'
' send_email Macro
' Macro created 28/06/2007 by XXX
'

ActiveDocument.HasRoutingSlip = True
With ActiveDocument.RoutingSlip
   .Subject = "Test Email button"
  .AddRecipient "Thirdaddress@Mail.com"
  .AddRecipient "Thirdaddress@Mail.com"
  .AddRecipient "Thirdaddress@Mail.com"
   .Delivery = wdAllAtOnce
End With
ActiveDocument.Route

End Sub
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.