Re: Macro sending email how to disable warning?
- From: Mitch <Mitch@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 27 Oct 2008 08:52:05 -0700
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" <Mitch@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:C513575D-171D-4B38-8C95-F9F986EA0840@xxxxxxxxxxxxxxxx
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
- Follow-Ups:
- Re: Macro sending email how to disable warning?
- From: Ken Slovak - [MVP - Outlook]
- Re: Macro sending email how to disable warning?
- References:
- Macro sending email how to disable warning?
- From: Mitch
- Re: Macro sending email how to disable warning?
- From: Ken Slovak - [MVP - Outlook]
- Macro sending email how to disable warning?
- Prev by Date: How to build a RecordSet
- Next by Date: Deleting an occurence of a recurring appointment without prompt
- Previous by thread: Re: Macro sending email how to disable warning?
- Next by thread: Re: Macro sending email how to disable warning?
- Index(es):
Relevant Pages
|