convert VBA code to Add-in

Status
Not open for further replies.
B

bWFzYW5pIHBhcmVzaA

Hi,

I have written simple VBA macro to delete recurrence meetings in

outlook(macro cod is given below). Could any one please tell me what is the

simplest method to convert this macro into Outlook Add-in such that it should

create button on Outlook toolbar and also register itself and start working.

Sub DeleteMeetings()

Dim olkItems As Outlook.Items

Set olkItems = Session.GetDefaultFolder(olFolderCalendar).Items

olkItems.IncludeRecurrences = True

For Each olkAppt In olkItems

olkAppt.Delete

Next

Set olkItems = Nothing

MsgBox "Macro executed successfuly: " & Err

End Sub

Thanks,

Paresh
 
K

Ken Slovak - [MVP - Outlook]

Using what development platform, language and Outlook version?

There is no VBA to addin converter, you first start with whatever platform

and language you want and set up a skeleton addin, then copy in your VBA

code and if necessary translate it into the language you're using.

If you intend to use managed code you will need to somehow shim your addin

so it has its own AppDomain, either using VATO or the COM shim wizard. If

using VB.NET you need to translate the code since VB.NET has many

differences from VBA code (for one thing Long is 64-bit and Integer is

32-bit). VB6 code is much closer to VBA code.

You then need to register your addin and deploy it as well as any

dependencies and prerequisites, such as the Framework for managed code.

"masani paresh" <masanip@deshaw.com> wrote in message

news:8C2E171E-4957-4801-9251-A0E6B3BD924C@microsoft.com...
> Hi,

> I have written simple VBA macro to delete recurrence meetings in
> outlook(macro cod is given below). Could any one please tell me what is
> the
> simplest method to convert this macro into Outlook Add-in such that it
> should
> create button on Outlook toolbar and also register itself and start
> working.

> Sub DeleteMeetings()

> Dim olkItems As Outlook.Items
> Set olkItems = Session.GetDefaultFolder(olFolderCalendar).Items
> olkItems.IncludeRecurrences = True

> For Each olkAppt In olkItems
> olkAppt.Delete
> Next

> Set olkItems = Nothing

> MsgBox "Macro executed successfuly: " & Err

> End Sub

> > Thanks,
> Paresh
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
B VBA to convert email to task, insert text of email in task notes, and attach copy of original email Outlook VBA and Custom Forms 4
Q How tough is it to convert VBA to Addin Outlook VBA and Custom Forms 1
K Need to convert .mmf file to .pst format Outlook VBA and Custom Forms 7
T Why does outlook 2010 convert only some forum notifications to plain text? Using Outlook 0
M Convert Subject Line to Internet Header version of Subject Outlook VBA and Custom Forms 10
E To convert imported data to custom fields in Task list Outlook VBA and Custom Forms 1
P How do I convert outlook “to-do” items to “tasks” Outlook VBA and Custom Forms 1
I Convert POP3 account (PST) to IMAP (.OST) Using Outlook 3
S problem with convert Using Outlook 1
I Outlook 2016 64bit - on receipt convert emails into PDF and save Outlook VBA and Custom Forms 2
C convert an .ost to .pst Using Outlook 3
D The way to convert ost to pst Using Outlook 2
J Outlook 2013 how to convert 2013 OST file into an another format, i m using outlook 2013 versions. Using Outlook 1
sneaky30 convert text to date Outlook VBA and Custom Forms 1
P Is it possible to convert address book to "Auto-Complete List" (NK2)? Using Outlook 5
Diane Poremsky Convert an Offline File (.ost) to a Personal File (.pst) Using Outlook 0
S How to do I convert OST file to PST? Exchange Server Administration 3
J convert .pst to .eml, how is it possible? Using Outlook 1
M convert/import a customized record into the default "Account" record BCM (Business Contact Manager) 0
V Check/convert to emailaddresses Outlook VBA and Custom Forms 11
R Convert Access table to pst Using Outlook 1
M Outlook 2013 won't convert Excel contacts into Outlook contacts using my custom form Using Outlook 3
L Convert Distribution List of Contacts to Single Contacts Using Outlook 6
G Is there any way to convert outlook 2003 to outlook 2007 Using Outlook 5
D Outlook contacts no in address book - 2002 pst file convert to 2007 pst file? Using Outlook 0
P Outlook 2002 - How to upgrade to 2003 and convert PST from ANSI to Unicode? Using Outlook 7
A Outlook 2003: convert all RTF emails to HTML Outlook VBA and Custom Forms 1
J How to convert BCM contacts to normal Outlook contacts BUT... BCM (Business Contact Manager) 2
G Tasks - convert email to task & attach email Outlook VBA and Custom Forms 6
A Re: Convert Oportunity to Project? BCM (Business Contact Manager) 3
D Create advanced search (email) via VBA with LONG QUERY (>1024 char) Outlook VBA and Custom Forms 1
David McKay VBA to manually forward using odd options Outlook VBA and Custom Forms 1
FryW Need help modifying a VBA script for in coming emails to auto set custom reminder time Outlook VBA and Custom Forms 0
S vba outlook search string with special characters Outlook VBA and Custom Forms 1
S VBA search string with special characters Outlook VBA and Custom Forms 1
U Outlook 2019 VBA run-time error 424 Outlook VBA and Custom Forms 2
DDB VBA to Auto Insert Date and Time in the signature Outlook VBA and Custom Forms 2
F VBA to move email from Non Default folder to Sub folders as per details given in excel file Outlook VBA and Custom Forms 11
G VBA to save selected Outlook msg with new name in selected network Windows folder Outlook VBA and Custom Forms 1
F Excel VBA to move mails for outlook 365 on secondary mail account Outlook VBA and Custom Forms 1
B Zoom automatically next email item (VBA) Outlook VBA and Custom Forms 2
T vba extract data from msg file as attachment file of mail message Outlook VBA and Custom Forms 1
K Outlook Office 365 VBA download attachment Outlook VBA and Custom Forms 2
A VBA Script - Print Date between first email in Category X and last email in Category Y Outlook VBA and Custom Forms 3
N Help creating a VBA macro with conditional formatting to change the font color of all external emails to red Outlook VBA and Custom Forms 5
N Save selected messages VBA does not save replies and/or messages that contain : in subject Outlook VBA and Custom Forms 1
Y Filter unread emails in a search folder vba help Outlook VBA and Custom Forms 0
V vBA for searching a cell's contents in Outlook and retrieving the subject line Outlook VBA and Custom Forms 1
B vBA for exporting excel file from outlook 2016 Outlook VBA and Custom Forms 3
L Modifying VBA script to delay running macro Outlook VBA and Custom Forms 3

Similar threads

Top