![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Board Regular
Join Date: Feb 2002
Location: Victoria, Australia
Posts: 761
|
I have a macro which cycles through a workbook, copies infomraton from each sheet onto a blank sheet, and emails the sheet to an email address on the sheet. It was originally developed in an earlier version of Office and worked fine. Now in Office 2000, a message comes up from Outlook saying that a program is trying to automatically send an email, is this OK, waits 5 seconds before it lets me click OK. I'm aware this is a feature which is trying to prevent spread of viruses, but the Macro sends about 120 emails, and sitting there clicking OK every five seconds sort of defeast the purpose.
TIA Richard |
|
|
|
|
|
#2 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Auckland, New Zealand
Posts: 4,209
|
Quote:
Yes this is a problem, and you are correct in that it is used due to security issues. It is a security patch Have a look @ http://www.dimastr.com/redemption HTH Ivan |
|
|
|
|
|
|
#3 |
|
Banned
Join Date: Feb 2002
Posts: 1,582
|
Hi Richard
I am not familiar with the issue (as Ivan is) but if the default for the message is "Yes" (send the email) try: Application.DisplayAlterts=False Application.DisplayAlterts=True This may or may not work (that's helpful isn't it) |
|
|
|
|
|
#4 |
|
Board Regular
Join Date: Feb 2002
Location: Victoria, Australia
Posts: 761
|
Dave,
I have the Application.Display.Alerts=FALSE. I don't think this feature can be bypassed that easily. You and Ivan helped me with this project some time ago, and if you remember some of my dumb questions, you will know I haven't a clue what I'm doing. Ivan, I visited the site you suggested. I gather this is some kind applcation which bypasses some of Outlooks security. I can download it, but all the talk about properties and objects etc is all gobbledegook to me. I am not a programmer. If I download it, do you know what code I would have to insert into my Macro? Thanks again guys Richard |
|
|
|
|
|
#5 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Auckland, New Zealand
Posts: 4,209
|
If you have downloaded it and installed it
then it is a matter of changing the code you do have to reference this COMS properties etc....the code looks straight forward. Post the code you use and I'll see if I can update this to eference the redemption objects Ivan |
|
|
|
|
|
#6 |
|
Board Regular
Join Date: Feb 2002
Location: Victoria, Australia
Posts: 761
|
Haven't downloaded it yet. I am waiting to get approval from my systems manager. He didn't seem to keen on me loading something which circumvents Outlook security. I'll convince him yet!!
Here's the code; Sub Send_New() ' ' Send_New Macro ' Macro recorded 5/07/2001 by Richard.Staude ' ' Application.ScreenUpdating = False Sheets("Sheet Index").Select Application.DisplayAlerts = False Dim counter As Integer For counter = 1 To ActiveWorkbook.Sheets.Count ' Check to see if email address in cell E1 on current sheet If Sheets(counter).[E1] <> "" Then Workbooks.Add Template:="Workbook" ActiveSheet.PageSetup.Orientation = xlLandscape ActiveWorkbook.SaveAs Filename:="C:Send Budget.xls", _ FileFormat:=xlNormal, Password:="", WriteResPassword:="", _ ReadOnlyRecommended:=False, CreateBackup:=False Windows("Report.xls").Activate Application.Goto Reference:="Print_Area" Selection.Copy Windows("Send Budget").Activate Range("A1").Select Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Selection.PasteSpecial Paste:=xlFormats, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Selection.Columns.AutoFit Windows("Report.xls").Activate Range("E1").Select Application.CutCopyMode = False Selection.Copy 'Copy email address to Send Budget Windows("Send Budget").Activate Range("A52").Select Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Range("A1").Select 'email Send Budget to email recipient ActiveWorkbook.SendMail Recipients:=Range("A52") ActiveWorkbook.Close SaveChanges:=False End If ActiveSheet.Next.Select Next counter Sheets("Sheet Index").Select Application.DisplayAlerts = True End Sub Thanks Richard |
|
|
|
|
|
#7 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Auckland, New Zealand
Posts: 4,209
|
Quote:
Your code is using the excel senmail command Not sure about using the Redemption here without rewritting your code to access Outlook.......If you like I can rewrite using Outlook directly and bypassing senmail Possible to email me your book....If data is sensitive then ust put junk data in but I'll need the format of the sheets etc Ivan |
|
|
|
|
|
|
#8 |
|
Board Regular
Join Date: Feb 2002
Location: Victoria, Australia
Posts: 761
|
File sent. It's a bit of a monster (6.2Mb). Thanks for the time Ivan
Regards Richard |
|
|
|
|
|
#9 | |
|
MrExcel MVP
Join Date: Feb 2002
Location: Auckland, New Zealand
Posts: 4,209
|
Quote:
Please note ....I'll do the best i can TIME wise...just bear in mind that I do have other projects...BUT i'll endeavour to get this done as it gives me an oportunity to look @ the Redemtion code... Ivan |
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|