Dear all,
Please help me, I have a problem recently.
What I was trying to do is that I have macro in excel to open a email template in Outlook to send out. And the email template in outlook contains link to other excel data. So when the template is opening, there is a pop up window saying: "the document contains links to other data, do you want to update the links?". Everytime the excel will stuck here and I need to swich to outlook window to click Yes then the marco will continue. Please do you have any idea what I can put in my macro to click Yes to update the links. Or, is there any setting in outlook whenever there's link, don't ask me and just update it? Thank you so much!! Waiting online for the answer... :thumb:
My code is simple:
Sub OutlookTemplate()
Dim myolapp As Object
Dim myitem As Object
Set myolapp = CreateObject("Outlook.Application")
myolapp.Session.Logon
Set myitem = myolapp.CreateItemFromTemplate("C:\test\outlook template test_.oft")
myitem.display
End Sub
Please help me, I have a problem recently.
What I was trying to do is that I have macro in excel to open a email template in Outlook to send out. And the email template in outlook contains link to other excel data. So when the template is opening, there is a pop up window saying: "the document contains links to other data, do you want to update the links?". Everytime the excel will stuck here and I need to swich to outlook window to click Yes then the marco will continue. Please do you have any idea what I can put in my macro to click Yes to update the links. Or, is there any setting in outlook whenever there's link, don't ask me and just update it? Thank you so much!! Waiting online for the answer... :thumb:
My code is simple:
Sub OutlookTemplate()
Dim myolapp As Object
Dim myitem As Object
Set myolapp = CreateObject("Outlook.Application")
myolapp.Session.Logon
Set myitem = myolapp.CreateItemFromTemplate("C:\test\outlook template test_.oft")
myitem.display
End Sub