A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Macro sending email how to disable warning?



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old October 20th 08, 11:14 PM posted to microsoft.public.outlook.program_vba
mitch
external usenet poster
 
Posts: 47
Default Macro sending email how to disable warning?

I know this must be asked a thousand times, but were do you go to get a
certificate to allow a macro to send a messages. Is there a cost?
The Macro works, just want to save time and not deal with a silly little
box. Lowering security wouldn't be the smartest thing to do so they can avoid
this.

Thanks,
Mitch
Ads
  #2  
Old October 21st 08, 02:39 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Macro sending email how to disable warning?

Which silly little box? What version of Outlook and is the macro running in
the Outlook VBA project?

If this is the security dialog warning that some code is doing something
then signing your VBA project won't help at all. In that case look at
http://www.outlookcode.com/article.aspx?id=52.

If the macro won't run at all due to High security then you can use the
self-generated certificate included in Office. You use the selfcert.exe
program to create the certificate. However that cert won't be recognized on
other machines. Each user would have to generate a cert and sign the VBA
project. You can google on "selfcert" for more information.

A cert traceable back to a CA (certificate authority) can be created in an
organization if you run a CA in the organization. Otherwise there are
commercial certificates available for Authenticode signing (class 3 cert)
from companies such as Verisign, Thawte, etc.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Mitch" wrote in message
...
I know this must be asked a thousand times, but were do you go to get a
certificate to allow a macro to send a messages. Is there a cost?
The Macro works, just want to save time and not deal with a silly little
box. Lowering security wouldn't be the smartest thing to do so they can
avoid
this.

Thanks,
Mitch


  #3  
Old October 27th 08, 03:52 PM posted to microsoft.public.outlook.program_vba
mitch
external usenet poster
 
Posts: 47
Default Macro sending email how to disable warning?

Outlook 2003,

VB here's a sample of the code. I removed the 2nd invite as it's the same
thing.
I'm looking up selfcert stuff for Outlook. Think it will work?

Sub Expire_Reminder()

Dim App
Dim Appmt
Dim FLName
Dim CompanyName
Dim DocType
Dim ExpireDate

Set App = CreateObject("Outlook.application")
Set Appmt = App.CreateItem(olAppointmentItem)

Appmt.MeetingStatus = olMeeting

FLName = InputBox("Enter First Last Name", "Name")
If FLName = "" Then Exit Sub

CompanyName = InputBox("Enter the Company Name", "Company Name")
If CompanyName = "" Then Exit Sub

DocType = InputBox("Enter one of the following Doc Types" &
Chr(13) & "WP, TRV, VR, TRP, SP or OTHER", "DocType")


Check = False
Do While Check = False
ExpireDate = InputBox("Enter Expire Date, Format: DD/MM/YYYY", "Document
Expire Date")
If IsDate(ExpireDate) = True Then Exit Do
If ExpireDate = "" Then Exit Sub
'Check if Value is a date
If IsDate(ExpireDate) = False Then
MsgBox "Sorry, but you did not enter a valid date."
End If
Loop

Dim ExpireDate1
Dim ExpireDate2

'Minus 90 days and store, minus 7 days and store
ExpireDate1 = DateAdd("d", -7, ExpireDate)

' Set app at start of day and uniquely identify Meeting item with *!* to
help processing

Appmt.Start = ExpireDate1 & " 8:00"
Appmt.Subject = "*!* " & FLName & " " & CompanyName & " " & DocType

Appmt.Duration = 15
Appmt.BusyStatus = Free

' Set app at start of day and uniquely identify Meeting item with *!* to
help processing

Set myRequiredAttendee = Appmt.Recipients.Add("TEST")
myRequiredAttendee.Type = olRequired
Set myRequiredAttendee1 = Appmt.Recipients.Add("TEST")
myRequiredAttendee1.Type = olRequired
Set myRequiredAttendee2 = Appmt.Recipients.Add("TEST")
myRequiredAttendee2.Type = olRequired

' Set as free time duration short 15 mins
Appmt.AllDayEvent = "false"
Appmt.ReminderSet = True
Appmt.ReminderMinutesBeforeStart = 15

' Send and save Meeting request
Appmt.Send
Appmt.Save



' Clear memory
Set Appmt = Nothing
Set App = Nothing

End Sub




"Ken Slovak - [MVP - Outlook]" wrote:

Which silly little box? What version of Outlook and is the macro running in
the Outlook VBA project?

If this is the security dialog warning that some code is doing something
then signing your VBA project won't help at all. In that case look at
http://www.outlookcode.com/article.aspx?id=52.

If the macro won't run at all due to High security then you can use the
self-generated certificate included in Office. You use the selfcert.exe
program to create the certificate. However that cert won't be recognized on
other machines. Each user would have to generate a cert and sign the VBA
project. You can google on "selfcert" for more information.

A cert traceable back to a CA (certificate authority) can be created in an
organization if you run a CA in the organization. Otherwise there are
commercial certificates available for Authenticode signing (class 3 cert)
from companies such as Verisign, Thawte, etc.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Mitch" wrote in message
...
I know this must be asked a thousand times, but were do you go to get a
certificate to allow a macro to send a messages. Is there a cost?
The Macro works, just want to save time and not deal with a silly little
box. Lowering security wouldn't be the smartest thing to do so they can
avoid
this.

Thanks,
Mitch



  #4  
Old October 28th 08, 01:23 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Macro sending email how to disable warning?

I'm still unclear where this code is running. Is it in the Outlook VBA
project? If so the most likely reason that you're getting a security warning
is that you aren't using the trusted Application object in the Outlook VBA
project but instead are instantiating App using CreateObject(). That creates
an untrusted instance of the Outlook.Application object. Use Application
instead.

For macro code in Outlook VBA using SelfCert to sign your VBA project will
allow the code to run even with High security set.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Mitch" wrote in message
...
Outlook 2003,

VB here's a sample of the code. I removed the 2nd invite as it's the same
thing.
I'm looking up selfcert stuff for Outlook. Think it will work?

Sub Expire_Reminder()

Dim App
Dim Appmt
Dim FLName
Dim CompanyName
Dim DocType
Dim ExpireDate

Set App = CreateObject("Outlook.application")
Set Appmt = App.CreateItem(olAppointmentItem)

Appmt.MeetingStatus = olMeeting

FLName = InputBox("Enter First Last Name", "Name")
If FLName = "" Then Exit Sub

CompanyName = InputBox("Enter the Company Name", "Company Name")
If CompanyName = "" Then Exit Sub

DocType = InputBox("Enter one of the following Doc Types" &
Chr(13) & "WP, TRV, VR, TRP, SP or OTHER", "DocType")


Check = False
Do While Check = False
ExpireDate = InputBox("Enter Expire Date, Format: DD/MM/YYYY",
"Document
Expire Date")
If IsDate(ExpireDate) = True Then Exit Do
If ExpireDate = "" Then Exit Sub
'Check if Value is a date
If IsDate(ExpireDate) = False Then
MsgBox "Sorry, but you did not enter a valid date."
End If
Loop

Dim ExpireDate1
Dim ExpireDate2

'Minus 90 days and store, minus 7 days and store
ExpireDate1 = DateAdd("d", -7, ExpireDate)

' Set app at start of day and uniquely identify Meeting item with *!* to
help processing

Appmt.Start = ExpireDate1 & " 8:00"
Appmt.Subject = "*!* " & FLName & " " & CompanyName & " " & DocType

Appmt.Duration = 15
Appmt.BusyStatus = Free

' Set app at start of day and uniquely identify Meeting item with *!* to
help processing

Set myRequiredAttendee = Appmt.Recipients.Add("TEST")
myRequiredAttendee.Type = olRequired
Set myRequiredAttendee1 = Appmt.Recipients.Add("TEST")
myRequiredAttendee1.Type = olRequired
Set myRequiredAttendee2 = Appmt.Recipients.Add("TEST")
myRequiredAttendee2.Type = olRequired

' Set as free time duration short 15 mins
Appmt.AllDayEvent = "false"
Appmt.ReminderSet = True
Appmt.ReminderMinutesBeforeStart = 15

' Send and save Meeting request
Appmt.Send
Appmt.Save



' Clear memory
Set Appmt = Nothing
Set App = Nothing

End Sub


  #5  
Old October 28th 08, 03:29 PM posted to microsoft.public.outlook.program_vba
mitch
external usenet poster
 
Posts: 47
Default Macro sending email how to disable warning?

Application eh, thanks for the tip. Just looking over the example, and I'm
not overly familiar with this. The code is running as a Macro in Outlook, I
created a button that activates it.
As for how to use this code, I tried a few different things and nothing
works. Kind of new, don't expect you to do it, but any tips would be useful.
I looked up application examples in the VB help file and this is what I get.
I think I'll work on certificate authorization.

Sub CreateMailItem()
Dim myolApp As Outlook.Application
Dim myItem As Outlook.MailItem
Set myolApp = CreateObject("Outlook.Application")
Set myItem = myolApp.CreateItem(olMailItem)
MsgBox myItem.Application.Version
End Sub


Sub CreateMailItem()
Set myItem = Application.CreateItem(olMailItem)
MsgBox myItem.Application.Version
End Sub



"Ken Slovak - [MVP - Outlook]" wrote:

I'm still unclear where this code is running. Is it in the Outlook VBA
project? If so the most likely reason that you're getting a security warning
is that you aren't using the trusted Application object in the Outlook VBA
project but instead are instantiating App using CreateObject(). That creates
an untrusted instance of the Outlook.Application object. Use Application
instead.

For macro code in Outlook VBA using SelfCert to sign your VBA project will
allow the code to run even with High security set.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Mitch" wrote in message
...
Outlook 2003,

VB here's a sample of the code. I removed the 2nd invite as it's the same
thing.
I'm looking up selfcert stuff for Outlook. Think it will work?

Sub Expire_Reminder()

Dim App
Dim Appmt
Dim FLName
Dim CompanyName
Dim DocType
Dim ExpireDate

Set App = CreateObject("Outlook.application")
Set Appmt = App.CreateItem(olAppointmentItem)

Appmt.MeetingStatus = olMeeting

FLName = InputBox("Enter First Last Name", "Name")
If FLName = "" Then Exit Sub

CompanyName = InputBox("Enter the Company Name", "Company Name")
If CompanyName = "" Then Exit Sub

DocType = InputBox("Enter one of the following Doc Types" &
Chr(13) & "WP, TRV, VR, TRP, SP or OTHER", "DocType")


Check = False
Do While Check = False
ExpireDate = InputBox("Enter Expire Date, Format: DD/MM/YYYY",
"Document
Expire Date")
If IsDate(ExpireDate) = True Then Exit Do
If ExpireDate = "" Then Exit Sub
'Check if Value is a date
If IsDate(ExpireDate) = False Then
MsgBox "Sorry, but you did not enter a valid date."
End If
Loop

Dim ExpireDate1
Dim ExpireDate2

'Minus 90 days and store, minus 7 days and store
ExpireDate1 = DateAdd("d", -7, ExpireDate)

' Set app at start of day and uniquely identify Meeting item with *!* to
help processing

Appmt.Start = ExpireDate1 & " 8:00"
Appmt.Subject = "*!* " & FLName & " " & CompanyName & " " & DocType

Appmt.Duration = 15
Appmt.BusyStatus = Free

' Set app at start of day and uniquely identify Meeting item with *!* to
help processing

Set myRequiredAttendee = Appmt.Recipients.Add("TEST")
myRequiredAttendee.Type = olRequired
Set myRequiredAttendee1 = Appmt.Recipients.Add("TEST")
myRequiredAttendee1.Type = olRequired
Set myRequiredAttendee2 = Appmt.Recipients.Add("TEST")
myRequiredAttendee2.Type = olRequired

' Set as free time duration short 15 mins
Appmt.AllDayEvent = "false"
Appmt.ReminderSet = True
Appmt.ReminderMinutesBeforeStart = 15

' Send and save Meeting request
Appmt.Send
Appmt.Save



' Clear memory
Set Appmt = Nothing
Set App = Nothing

End Sub



  #6  
Old October 28th 08, 03:55 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Macro sending email how to disable warning?

Yes, that's how you'd use Application, which as I mentioned is trusted by
Outlook.

Have you looked at the code samples and searched for keywords at
www.outlookcode.com? It has the largest selection of code examples out
there.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Mitch" wrote in message
...
Application eh, thanks for the tip. Just looking over the example, and I'm
not overly familiar with this. The code is running as a Macro in Outlook,
I
created a button that activates it.
As for how to use this code, I tried a few different things and nothing
works. Kind of new, don't expect you to do it, but any tips would be
useful.
I looked up application examples in the VB help file and this is what I
get.
I think I'll work on certificate authorization.

Sub CreateMailItem()
Dim myolApp As Outlook.Application
Dim myItem As Outlook.MailItem
Set myolApp = CreateObject("Outlook.Application")
Set myItem = myolApp.CreateItem(olMailItem)
MsgBox myItem.Application.Version
End Sub


Sub CreateMailItem()
Set myItem = Application.CreateItem(olMailItem)
MsgBox myItem.Application.Version
End Sub


  #7  
Old October 28th 08, 05:06 PM posted to microsoft.public.outlook.program_vba
mitch
external usenet poster
 
Posts: 47
Default Macro sending email how to disable warning?

Never heard of the site before. Thank you for pointing it out!
I have looked around though.

"Ken Slovak - [MVP - Outlook]" wrote:

Yes, that's how you'd use Application, which as I mentioned is trusted by
Outlook.

Have you looked at the code samples and searched for keywords at
www.outlookcode.com? It has the largest selection of code examples out
there.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Mitch" wrote in message
...
Application eh, thanks for the tip. Just looking over the example, and I'm
not overly familiar with this. The code is running as a Macro in Outlook,
I
created a button that activates it.
As for how to use this code, I tried a few different things and nothing
works. Kind of new, don't expect you to do it, but any tips would be
useful.
I looked up application examples in the VB help file and this is what I
get.
I think I'll work on certificate authorization.

Sub CreateMailItem()
Dim myolApp As Outlook.Application
Dim myItem As Outlook.MailItem
Set myolApp = CreateObject("Outlook.Application")
Set myItem = myolApp.CreateItem(olMailItem)
MsgBox myItem.Application.Version
End Sub


Sub CreateMailItem()
Set myItem = Application.CreateItem(olMailItem)
MsgBox myItem.Application.Version
End Sub



 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Disable delay Sending email option NE_Tech Outlook - Installation 0 December 31st 07 05:38 PM
How to disable the Delay sending of email in Options Larry Outlook and VBA 1 December 30th 07 04:05 PM
How to remove the Outlook access warning for sending email with other programs. Rico Outlook - General Queries 5 March 22nd 07 02:41 AM
How do you Disable Outlook Warning in Automated Email? Need lots of help! Outlook and VBA 1 January 13th 07 07:36 AM
How to disable security warning? Richard Lewis Haggard Outlook - General Queries 2 April 4th 06 04:07 PM


All times are GMT +1. The time now is 08:28 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2024 Outlook Banter.
The comments are property of their posters.