Emailing print area

Any ideas how I can email only the print area of a worksheet?  I also need to 
be able to save only the print area into another file.  Both of these have to 
be done with absolutely no technical expertise, in other words just push a 
button, no copy and paste or anything else so technical!
0
TexMas (7)
4/1/2005 2:39:03 PM
excel.misc 78881 articles. 5 followers. Follow

1 Replies
376 Views

Similar Articles

[PageSpeed] 3

Hi Texmas

Try this one for the activesheet
It will save the file in C:\
Change the e-mail address

More info on my site
http://www.rondebruin.nl/sendmail.htm

See David McRitchie's site if you just started with VBA
http://www.mvps.org/dmcritchie/excel/getstarted.htm


Sub Mail_Range()
    Dim source As Range
    Dim dest As Workbook
    Dim strdate As String

    Set source = Nothing
    On Error Resume Next
    Set source = Range(ActiveSheet.PageSetup.PrintArea).SpecialCells(xlCellTypeVisible)
    On Error GoTo 0
    If source Is Nothing Then
        MsgBox "The source is not a range or the sheet is protect, please correct and try again.", vbOKOnly
        Exit Sub
    End If

    Application.ScreenUpdating = False
    Set dest = Workbooks.Add(xlWBATWorksheet)
    source.Copy
    With dest.Sheets(1)
        .Cells(1).PasteSpecial Paste:=8
        ' Paste:=8 will copy the column width in Excel 2000 and higher
        ' If you use Excel 97 use the other example
        .Cells(1).PasteSpecial xlPasteValues, , False, False
        .Cells(1).PasteSpecial xlPasteFormats, , False, False
        .Cells(1).Select
        Application.CutCopyMode = False
    End With

    strdate = Format(Now, "dd-mm-yy h-mm-ss")
    With dest
        .SaveAs "C:\Selection of " & ThisWorkbook.Name _
                & " " & strdate & ".xls"
        .SendMail "ron@debruin.nl", _
                  "This is the Subject line"
        .Close False
    End With
    Application.ScreenUpdating = True
End Sub


-- 
Regards Ron de Bruin
http://www.rondebruin.nl



"TexMas" <TexMas@discussions.microsoft.com> wrote in message news:9274619A-5A3C-48B0-B1A9-64B20C15BA3C@microsoft.com...
> Any ideas how I can email only the print area of a worksheet?  I also need to
> be able to save only the print area into another file.  Both of these have to
> be done with absolutely no technical expertise, in other words just push a
> button, no copy and paste or anything else so technical! 


0
rondebruin (3789)
4/1/2005 3:03:06 PM
Reply:

Similar Artilces:

Print different from worksheet view
I have an excel worksheet, all cells are same size. Alot of the fields are just text info with some box formatting. I have 3 rows where I have text spanning about 12 colums but the text is just entered in the first cell. On the screen the text goes to the right edge of my box (or the right edge of my page). But when I do a print preview or print it, the text actually runs to about 2 columns shy of what the screen shows. This is the first I have ever seen this. What would cause this? -- lmcdonald ------------------------------------------------------------------------ lmcdonald...

Can Recieve email but cannot send out
For Outlook 2003, cannot send out. Have internet connection, and can receive emails. I have tried disabling firewall and Norton, but no luck. Any suggestions? are you getting any kind of error back? "Mark Sanford" <anonymous@discussions.microsoft.com> wrote in message news:cc5901c43909$3916a210$a301280a@phx.gbl... > For Outlook 2003, cannot send out. Have internet > connection, and can receive emails. I have tried > disabling firewall and Norton, but no luck. Any > suggestions? "Mark Sanford" <anonymous@discussions.microsoft.com> wrote in me...

HELP: Lost all my old emails
Hello, First there was the power failure. Then there was Windows XP recovery program (that ran automatically). Now, my desktop is blown away and all my Outlook emails and contacts are gone. Could these files be lurking in some obscure directory? Don't say search for dbx files. My computer doesn't have any. I'm running Windows XP media edition. Regards and thanks. do a search for pst files. or you can try .pab files for your personal address book. If those arent there.. You might be screwed! I save my pst files on my server where they are backed up.. for just this re...

Embedded images shrink in Chart area when printing
I am having trouble pasting a small jpg image in the chart area of my charts. The image looks fine on screen but when I print preview or print, the image is SOMETIMES squashed. This occurs if I print the worksheet or the chart. I have a worksheet with say three charts, the squished image issue is intermittent on all three charts. This is occuring with no change in the data feeding the charts, no change in row or chart area heights. Is there any support for this? The first question someone may ask is how I paste the image. I am selecting the chart area, then pasting the image. Th...

outlook email questionaire
I want to send an email to clients that has a questionaire on it with text answers. I want them to be able to answer the questions and then click a button at the bottom of the page that will send it directly to my email without them having to enter my address. How do I do this? Well, i's possible to do what you want (mail a form to someone that's editable on the receiving end and runs code to send mail when done) but is not easy. Check out www. outlookcode.com for some ideas on how to approach this. If you are not using an exchange server, I'd recommend using Form Regions...

Email
I have created a simple Access database that our HR department will use to input demographic information on a new employee, as well as what software, access, etc. a new employee will need. Again, it is VERY simple, but what I can't figure out is how to create a button that the HR staff can click on and the file, with all the information, is emailed to our IS department. Can this be done? You can setup a report to based on your current record and email it using SendObject or using Outlook automation. This does require a minimal amount of VBA programming in either case. If you sear...

Can't forward to an external email address...
We have a user that uses his external AOL account as well as his company email account. He has asked me to forward all company mail to his external AOL account. I figured I'd be able to just go into the delivery options on the "Exchange General" tab for his user profile and forward to the appropriate address. However, you cannot enter just any address in there, it forces you to select an address from the directory - of course his AOL address is not there. Is there an easy way to forward all mail from his internal account to an external account? I tried creating a rule on his Out...

email addresses in memory
An outlook 2003 user states that when sending out an email and when they type in a letter in the "to" area the email addresses that were in memory when you type a letter or name are gone. They said they didn't do anything different. The addresses are in the contact list but there is nothing in memory so you have to type the whole address in. Is this possible or can address in memory be deleted or removed? They are stored in the *.nk2 file located in Docs&Settings\Application Data\Microsoft\Outlook (by default) You dont have to type the address in, just click the &...

Unlinking tracked emails in CRM 3.0
I find that once an email is linked to/tracked by CRM (Customer, Client, Activity) it can't be unlinked! only deleted. For example; A client uses an old CRM generated email containing the tracking token to ask about a new problem. CRM automatically tracks the new email to the old CRM case and I can't untrack it to link it to a new case. Any information would be helpful... Hi, Check out "How to "untrack" Microsoft CRM Outlook e-mails" on following blog http://blog.sonomapartners.com/ -- PLEASE do click on Yes or No button if this post was helpful or not for ou...

Korean email
I can type and send Korean characters in emails but cannot receive them in Outlook 2003. Any help? ...

outlook express outgoing email disappears
I use Windows98 SE and Outlook Express6. Sometimes and with different addressees when I send an email it is received by the addressee ok but it is not in my sent items folder so I have no record of it! It does not happen every time -- perhaps about 1 in 6. I'M probably overlooking the obvious. Suggestions welcome. i suggest the outlook express newsgroup -Gary "Sean Dunne" <dunnes@iol.ie> wrote in message news:128d001c3f72d$d457f8f0$a101280a@phx.gbl... > I use Windows98 SE and Outlook Express6. Sometimes and > with different addressees when I send an email it...

Instant search of emails (10,000) fails
Failure of instant search requires reboot befor resolving for search or two and again fails ...

Slow printing of multiple copies
Multiple copies of documents sometimes seem to reinitialise the printer for each copy instead of only once at the start of the job. This makes printing very slow with significant pauses between copies. I'm using Publisher 2007 on Vista to a usb-connected Xerox Phases 6180 colour laser which has 128 MB of memory and most documents work fine. Can anyone help? Hugh Do you have gradients in your publication? Try an experiment. Save the gradient as a .png-- insert back into your document. Try printing again. You could take a look at the spooler to see how your documents are s...

How do I Full screen an Email???
I looking for a way to look at an email that I receive in a full screen mode. The way I'm trying to see it is like I was in I.E. and pressed the f11 key or if I was in Word or Excel & used the Alt+V+U function for full screen. What I am trying to see just the heart of the email not the header or anything else but the email body Craig <cb3_3@hotmail.com> wrote: > I looking for a way to look at an email that I receive in > a full screen mode. The way I'm trying to see it is like > I was in I.E. and pressed the f11 key or if I was in > Word or Excel & us...

Printing using MFC ??
Hi, I have some printing related Qs in MFC frame work. 1. How to print big text on multiple pages. My undersatnding is that for every page OnPrint is called, Is this correct ? So OnPrint will be called n number of times ??? 2. How can I put some gaps between text and start the printing on a new page. Reagrds, Harvinder Singh Harvinder Singh, Check out the following link (beware of wrapping): http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore98/ht ml/_core_printing.3a_.multipage_documents.asp Johan Rosengren Abstrakt Mekanik AB "harvinder singh&qu...

email forwarding to my other email
I have two email accounts. One I use for work and the other for personal. For some reason, my personal email is being forwarded to my work email. I don't know why and how do I stop it....? Are these POP3 accounts? Has it ever worked? Are they separate accounts, or addresses that are aliases for the same Inbox? Does your personal e-mail show in both places, or is it going to your work only? Any rules set up in WinMail, or on the server's Website? -- Bruce Hagen MS-MVP [Mail] Imperial Beach, CA "az otr" <az otr@disc...

Print is not 'WYSIWYG' as per Preview
I am printing documents on my HP LaserJet 1022 and ALWAYS getting lines at the right hand side of the page. These lines appear wherever I have a border (Excel 2007) or where I have a table (Word 2007). And it doesn't matter if there is text or whatever within a box, bordered cell or table. Can someone help because I cannot use office in a professional capacity, printing out documents that look apalling, with these lines down the right hand side which resemble something like morse code! Try disabling "Advanced Printing Features" in your printer's Printing ...

Area chart
I have a really studpid question. How do you create an area chart when you have different data points on seperate sheets. For example, I have four worksheets (June, July, August, September) and want to pick one number from each sheet for the chart data. I am new to excel and have no clue. Thanks for any help. The range that constitues the x- or y- values for a single series must come from a single worksheet. So, create a range on a single sheet with the data from the separate sheets. Depending on what the data represent and how they are updated, use of a formula might simplify ...

Emails not leaving outbox
Hi all - I am having what seems to be a common problem, but all of the suggested fixes I found did not work. I have set up SQLServer to use MAPI to email notifications. I have Outlook 2000 installed and configured and working. The SQLServer notifications part isworking too. The only thing I can't figure out is the emails never leave the outbox until I start Outlook and click Send/Receive. Then they are all sent fine. I read some articles mentioning MAPISP32, which appears to be the culprit. From what I see it's supposed to spool emails that are in the Outlook outbox. I found after I ...

Missing text in email
I recently installed Exchange 2003. From time to time when my users send email outside the company there messages are missing text upon arrival. The text missing could be two sentences at the end of a paragraph and the next one starts okay, or it could be a very words missing here and that. Any ideas of this Michelle P. Michelle: I know you have probably thought about this already, but do you have any type of content inspection system installed on your Exchange server? Or anything installed that stamps a message disclaimer on the message. Is the message changed by the clien...

question about grouping the emails.
Hi, I am signed-up to a discussion group and i get question about a prob and also solutions as a reply. i am grouping the e-mails by subject, For example... subject: "problem with ABCDE" in reply the subject will be "RE: problem with ABCDE" now Outlook2003 is grouping these two into seperate groups and if there is a reply with subject "RE:RE: problem with ABCDE" it groups that seperately. i want to group the replies also into the same group. the reply to the emails are grouped seperately. i want to have an exception in the grouping saying to ignore the word...

Outlook Client
Hi all, In the web client there is an email icon available from the views which allows you to send a direct email to the selected records in the view. Does anyone know if there is any way to call this from the Outlook client. Appreciate it :) cheers Nathan Hi, I'm afraid I can't help you out on this one. But I found that it's not only the icon missing in the Outlook client, but as soon as the Outlook client is active, the icon disappears in the Webclient also. This seems the same issue to me as the settings button disappearing when the Outlook client is active, wh...

Not receiving emails
I have not checked my emails for 1 week. Now when I try to log in it ask for a user name and password. When I enter them it states Your servers has unexpectedly terminated the connections 0x800CCC0F???????????????? I can send messages but can't receive HELP ANYONE. Pam C wrote: > I have not checked my emails for 1 week. Now when I try > to log in it ask for a user name and password. When I > enter them it states Your servers has unexpectedly > terminated the connections 0x800CCC0F???????????????? > I can send messages but can't receive HELP ANYONE. This is an is...

Hyperlinks blocked within email messages
Suddenly I can't open any links from within received messages. I receive the following error message: "This operation has been cancelled due to restrictions in effect on this computer. Please contact your system administrator." "System administrator" would be me. This is a standalone computer connected via a Linksys router to a cable modem. There's no domain involved and there are two Users (both administrators) set up, only one of which has the problem. I'm using Outlook 2007 under Vista Ultimate and this has only started happening in the last week...

Purging Junk Email
Hi. The problem is that for the most part, my users don't purge their junk on their own and it just keeps builing up and it is stating to take up way too much space on my exchange server. I need to know if there is a way of automatically purging my users' Junk E-mail Folders every week on the server side (Excahnge) as oppsed to the client side (Outlook). Yes, use Mailbox Manager its a very nice tool to keep your Exchange Mailboxes clean. See http://www.msexchange.org/tutorials/MF012.html -- John Oliver, Jr. MCSE, MCT, CCNA, Exchange MVP Microsoft Certified Partner "Otto H...