khongtu19bk
Thành viên hoạt động
- Tham gia
- 5/12/09
- Bài viết
- 147
- Được thích
- 69
Từ outlook ta gọi thủ tục test của macro excel như sau:
ở trên là file .xlsm
Vấn đề là với macro excel file addin (.xlam) thì phải làm như thế nào? ai biết xin mách dùm.
Mã:
Sub trans_outlook()
Dim xlApp As Object, xlWkb As Object
Set xlApp = CreateObject("Excel.Application")
xlApp.Visible = False ' can be False if you do not wont see reaction, byt make sure is not fail
Set xlWkb = xlApp.Workbooks.Open("C:\Users\xyz.xlsm")
xlApp.Run "xyz.xlsm!Test"
xlWkb.Close savechanges:=False
xlApp.Quit
End Sub
Vấn đề là với macro excel file addin (.xlam) thì phải làm như thế nào? ai biết xin mách dùm.