Consulting

Results 1 to 6 of 6

Thread: Sleeper: Opening MS Outlook outside of remote desktop via VBA

  1. #1
    Banned VBAX Newbie
    Joined
    May 2023
    Posts
    3
    Location

    Sleeper: Opening MS Outlook outside of remote desktop via VBA

    Hi All
    *Yes I have posted on another forum but with no resolution hence why I am trying this forum
    https://www.accessforums.net/showthread.php?t=88083

    We have recently moved our Microsoft Access Database to a RD Web Access - RemoteApp and Desktop Connection, all VBA / Macros all work as it should apart from one issue.

    Prior to moving to RD Web we had VBA code that when a button is pressed by the user it opens op MS Outlook fills out an Email template automatically and all the user has to to is click send.

    Since moving to RD Web using VBA to open Outlook no longer works as security does not allow outlook to open within the RD Web. I am hoping there is a way that I can force MS Outlook to open outside of the Remote window and complete the task instead and create an Email. anyone have any ideas how we can do this as I am not afraid to so it this is well above my knowledge of VBA?


    Unfortunately the security levels do not allow outlook to be opened within the remote access so trying to force it open outside of this remote window,

    Below is my current code that worked on the standalone system, but since moving to the RD Web I currently get a run-time error of '429', ActiveX Component cant create object.



     Dim oWo  As Object 'Outlook.Application
        Dim oDoc1 As Object 'Word.Document
        'Set oWd = New Word.Application
        Set myOlApp = CreateObject("Outlook.Application")
        Set myitem = myOlApp.CreateItemFromTemplate(CurrentProject.Path & "\TemplateFiles\PasswordEmail.oft")
     
        myitem.Subject = UCase("HR RECORDS - " & "[" & [Forms]![FRM_TBLALL_FullDetails].[Form]![LblHRRef])
     
        myitem.To = UCase([Forms]![FRM_TBLALL_FullDetails]![SFRM_TBLALL_STAFFDetails]![SSFRM_TBLALL_INTERVDetails].[Form]![CmbStaffNo].Column(0))
     
        myitem.display
     
        myitem.body = "Hello" & Chr(13) & Chr(10) & "You will receive an encrypted report and all relevant files required." & Chr(13) & Chr(10) & _
     
        "Your encryption password is:" & [Forms]![FRM_TBLALL_FullDetails]![SFRM_TBLALL_STAFFDetails]![SSFRM_TBLALL_INTERVDetails].[Form]![Password]
      
    End Function
    Thank you in Advance!
    Stu
    Last edited by Stu_c; 05-11-2023 at 02:39 AM.

  2. #2
    VBAX Regular
    Joined
    Nov 2020
    Location
    Swansea,South Wales,UK
    Posts
    86
    Location
    Crossposted first at
    https://www.access-programmers.co.uk...esktop.327497/

    https://www.accessforums.net/showthread.php?t=88083

    O/P had been advised about crossposting in both threads.
    O/P has not had any responses yet, but still .......

  3. #3
    Moderator VBAX Guru Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    4,997
    Location
    Stu_c, perhaps you should read this https://www.excelguru.ca/content.php?184 to understand why all the forums are against cross posting if its done incorrectly. My question to you is, why didn't you mention the cross posts when you initially started the thread, rather than admitting to it only after Gasman had raised the issue?
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

  4. #4
    Banned VBAX Newbie
    Joined
    May 2023
    Posts
    3
    Location
    Unfortunately I did not realise there is a code of ethics on what forums I can post what on, but thank you for the link.
    The reason I posted here was purely due to the fact it appears to be a VBA specific forum, it does appear certain members feel the need to just go looking for cross posts ad then post on them purely to boost their post grades up.

    Quote Originally Posted by Aussiebear View Post
    Stu_c, perhaps you should read this https://www.excelguru.ca/content.php?184 to understand why all the forums are against cross posting if its done incorrectly. My question to you is, why didn't you mention the cross posts when you initially started the thread, rather than admitting to it only after Gasman had raised the issue?

  5. #5
    VBAX Regular
    Joined
    Nov 2020
    Location
    Swansea,South Wales,UK
    Posts
    86
    Location
    it does appear certain members feel the need to just go looking for cross posts ad then post on them purely to boost their post grades up.
    No, I just do not want people who give their time freely to waste it when the same advice could be offered on different forums.
    I particularly dislike people who though informed about crossposting, just blatantly decide to ignore the etiquette. When you join a forum for the first time, this is excusable, but when you have over 400 posts on AWF, joined back in 2007, and AF in 2010, you cannot use that excuse.

    Not to worry, welcome to my IL.

  6. #6
    Moderator VBAX Guru Aussiebear's Avatar
    Joined
    Dec 2005
    Location
    Queensland
    Posts
    4,997
    Location
    Stu_c, The link I provided for you, clearly sets out why all forums discourage crossposting, and people have to option to point out such anti forum behaviour. This forum takes cross posting seriously, as we value the contributions of our members. A simple apology would suffice, and then it's up to the members to assist you if they feel such.
    Remember To Do the Following....
    Use [Code].... [/Code] tags when posting code to the thread.
    Mark your thread as Solved if satisfied by using the Thread Tools options.
    If posting the same issue to another forum please show the link

Tags for this Thread

Posting Permissions

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