VBA: Replace the Outlook "View in Browser" using any browser you wish

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 ก.ย. 2024
  • Part 2 of the Outlook View in Browser function, for those who want to replace it with one that works as it shoud do, by viewing in the browser of your choice.
    Here you can download the VBA module with everything yo uneed inside it, and the video will talk you through how to get it set up and ready in 15 minutes! Not bad for a freebie huh?
    Download Module: daytaacad.shar...

ความคิดเห็น • 10

  • @ianjacobs3367
    @ianjacobs3367 3 ปีที่แล้ว +3

    @JohnDayQA: I don't know VBA. I copied the code into my Outlook and it worked straight away without changing it.
    Should I be worried or lucky?

    • @JohnDayQA
      @JohnDayQA  3 ปีที่แล้ว +2

      That's great news. In most cases very little code needs to be changed but everyone's windows environment is different, and it depends on whether you have the 32bit (Prgram Files (x86) or 64bit (Program Files) versions of browsers.

  • @minjookim7547
    @minjookim7547 3 ปีที่แล้ว +2

    outlook view in browser pain in the rear issue?
    LOL....

  • @JohnDayQA
    @JohnDayQA  3 ปีที่แล้ว

    TO EVERYONE:
    You may need to add a few Replace commands as not all illegal characters have been spotted. There are so many that can be used in the subject line that the code would have been 50 times longer.
    strMessageFile = Replace(strMessageFile, """", "'"): strMessageFile = Replace(strMessageFile, "@", "-")
    ' replaces a double-quote with a single-quote
    strMessageFile = Replace(strMessageFile, ".", ""): strMessageFile = Replace(strMessageFile, "?", "") ' replaces a full-stop or period with nothing (just removes it).
    Add your own as you encoutner them.

  • @daytamod8806
    @daytamod8806 3 ปีที่แล้ว +1

    Does not work. The code crashes with run-time error - Operation failed.
    It crashed highlighting the line "objItem.SaveAs strMessagePath & strMessageFile & ".html", olHTML"

    • @JohnDayQA
      @JohnDayQA  3 ปีที่แล้ว +2

      @DaytaMOD Your message has failed becasue the file name still has some illegal characters. If you open the immediate window from the view mene, and type debug.print strMessageFile, read the file name. If it contains question marks, commas, plus signs, then take one of the lines of code as mentioned in the videeo and paste it replacing the illegal character with one that is allowed.
      e.g. : strMessageFile = Replace(strMessageFile, "?", "")
      This will remove the question mark and not replace it with nothing.

    • @daytamod8806
      @daytamod8806 3 ปีที่แล้ว

      @@JohnDayQA That Worked! I did not know you could remove illegal characters and replace it with nothing. That is superb.
      Thank you.

  • @colindrew5931
    @colindrew5931 3 ปีที่แล้ว +1

    Hi John. I copied the code but it does not run. I can add the macros but I cannot rename them. Any help would be cool.

    • @JohnDayQA
      @JohnDayQA  3 ปีที่แล้ว +1

      Colin, your Outlook has diabled running of Macros or is set to run digitally signed Macros.
      1: Click the FIle Tab --> Options
      2: Click Trust Center on the left.
      3: Click Trust Center Settings button on right.
      4: Click Macro Settings on the left
      5: Select Notification for all Macros (recommended if you do not have a digital signature.

    • @colindrew5931
      @colindrew5931 3 ปีที่แล้ว

      @@JohnDayQA Got it. Now works. Thank you.