+ Reply to Thread
Results 1 to 4 of 4

How to click YES for the popups when open an Outlook Email template from Excel Macro?

  1. #1
    Registered User
    Join Date
    07-17-2013
    Location
    uae
    MS-Off Ver
    Excel 2013
    Posts
    3

    Lightbulb How to click YES for the popups when open an Outlook Email template from Excel Macro?

    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

  2. #2
    Forum Expert Alf's Avatar
    Join Date
    03-13-2004
    Location
    Gothenburg/Mullsjoe, Sweden
    MS-Off Ver
    Excel 2019 and not sure I like it
    Posts
    4,758

    Re: How to click YES for the popups when open an Outlook Email template from Excel Macro?

    Perhaps adding command "UpdateLinks" to your macro will work?

    Please Login or Register  to view this content.
    Alf

  3. #3
    Registered User
    Join Date
    07-17-2013
    Location
    uae
    MS-Off Ver
    Excel 2013
    Posts
    3

    Re: How to click YES for the popups when open an Outlook Email template from Excel Macro?

    Quote Originally Posted by Alf View Post
    Perhaps adding command "UpdateLinks" to your macro will work?

    Please Login or Register  to view this content.
    Alf
    Thank you for your reply Alf.
    but update links is not working. Excel will be in dead model, unless I change to the window of outlook, then I'll see the pop up windows asking if wanna update the linked data.
    Is there other ways? or, is there way in outlook to disable this asking to automaticlly update the linked data? Thank you!

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,592

    Re: How to click YES for the popups when open an Outlook Email template from Excel Macro?

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 1
    Last Post: 07-17-2013, 08:10 AM
  2. Create macro to open daily email and Excel attachment from Outlook
    By wardpa in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-02-2013, 10:26 AM
  3. Create macro to open daily email and Excel attachment from Outlook
    By uimhirADo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-01-2012, 09:23 PM
  4. Open outlook saved messaged from a folder through the click of a button in excel
    By chris2 in forum Outlook Programming / VBA / Macros
    Replies: 0
    Last Post: 09-20-2012, 11:06 AM
  5. Replies: 1
    Last Post: 01-22-2010, 03:57 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1