Click here to Skip to main content
11,928,078 members (46,143 online)
Click here to Skip to main content
Add your own
alternative version


16 bookmarked

Execute Access 2003 Macros in SSIS Package

, 29 Dec 2006
Rate this:
Please Sign up or sign in to vote.
Execute Access 2003 Macros in SSIS Package. How to call Access Macros in SSIS Package

Note: Change the Security Level for Access Macro, otherwise whenever the SSIS package
executes, it will popup a Security Warning Message. To avoid this, follow the instructions:
Open Access -- > Tools --> Macro --> Security
Click Security and change to Low Level.


Basically to execute Access Macros in SSIS package, we need to download Microsoft.Office.Interop.Access DLL from Office XP PIAs. The file can be downloaded from the link at the top of this article.

Using the code

  1. Extract the Microsoft.Office.Interop.Access DLL from Oxppia.exe
  2. Drag and Drop Microsoft.Office.Interop.Access DLL to Global Assembly Directory(GAC)
    • C:\WINNT\assembly for Windows 2000
    • C:\WINDOWS\assembly for Windows XP and Windows 2003
  3. Copy paste Microsoft.Office.Interop.Access to
    • C:\WINNT\Microsoft.NET\Framework\v2.0.50727 for Windows 2000
    • C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 for Windows XP and Windows 2003
  4. Add DLL reference in the Script Task
  5. Add the code given below
  6. Create a New Project in SSIS
  7. Drag and Drop the Script Task
  8. Copy Paste the code in script task editor

Imports Microsoft.Office.Interop.Access

    Dim objAccess As New Access.Application
    objAccess.OpenCurrentDatabase("D:\TestMacro.mdb", False)    
        ' Add the Access File Path
        ' Replace  Macro1 with the name of your macro
    objAccess = Nothing
    Catch ex As Exception
End Try

Dts.TaskResult = Dts.Results.Success


This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


About the Author

Deepu M.I
Web Developer
India India
No Biography provided

You may also be interested in...

Comments and Discussions

QuestionPackage runs OK manually but not as a scheduled Job Pin
GrahamReeves00721-Apr-15 9:16
memberGrahamReeves00721-Apr-15 9:16 
TheHose20-Apr-11 12:47
memberTheHose20-Apr-11 12:47 
GeneralPlease help... Pin
MaYo6927-Jun-07 1:01
memberMaYo6927-Jun-07 1:01 
GeneralRe: Please help... Pin
senenami24-Jul-07 12:56
membersenenami24-Jul-07 12:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.151126.1 | Last Updated 29 Dec 2006
Article Copyright 2006 by Deepu M.I
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid