Meeting Invite Macro Round 2 - Microsoft Community
- Get link
- X
- Other Apps
i trying create macro meeting invitation @ location, , if finds text "meet", check body of invitation see if 1 of 2 other phrases present. if is, sends invite, if not, provides warning. i created code below help. but not working.
thanks
private withevents items outlook.items <-is correct intro? i wrote similar macro when sending email , started with private sub application_itemsend(byval item object, cancel boolean)
private sub application_startup()
dim ns outlook.namespace
set ns = application.getnamespace("mapi")
set items = ns.getdefaultfolder(olfoldercalendar).items
set meetingtext = appointmentitem.body < - should meetingitem.body?
set meet = 0
end sub
private sub items_itemadd(byval item object)
on error resume next
if item.class = olappointment then
if item.subject = "meet" then
if instr(1, item.body, "a meeting has been added.", vbtextcompare) > 0 meet = 1
if instr(1, item.body, " important notice: please note service allows ", vbtextcompare) > 0 meet = 1
end if
end if
if amexmeet = 1 then
prompt = "this invite not contain amexmeet link. do want proceed?"
if msgbox(prompt, vbyesno + vbexclamation + vbmsgboxsetforeground, "check address") = vbno then
cancel = true
end if
end if
end sub
hi paul,
for better assistance regard creating macro, suggest post query on forum to best support experts. should in hands.
if have other concerns, don't hesitant post on forum.
Office / Outlook / Microsoft Office Programming
- Get link
- X
- Other Apps
Comments
Post a Comment