Forum Discussion

Tony2021's avatar
Tony2021
Steel Contributor
Sep 08, 2021

Importing Data into Outlook Calendar

Hello,

I am trying to upload excel data into an Outlook calendar.

I have an error on my code on WScript   "Variable Not Defined"

strFil = WScript.Arguments(0)

(row ~25)

I am not sure why.  

I have attached the code in Notepad.

Do  you see where the issue might be?  

Note:  I am not a coder. 

 

thank you very much

  • Given the fact that this is not your own code, and that particular reference appears to be unexplainable given what we can see, I might want to go to the source of the code and ask for clarification. I suspect that you are missing some important part of the full code. As I think I mentioned in a previous post, I would expect the WScript reference to pertain to a Windows scripting function anyway.

  • George_Hepworth's avatar
    George_Hepworth
    Silver Contributor

    Tony2021 

    Two questions.

    One. This forum is devoted to the MS Access application, used to create relational database applications. So, are you trying to import data in Outlook from Excel from code running in an Access module? Or in Outlook? Or in Excel? (Well, three questions about one topic.)

    Two, you show only one line, the one with the error. The error message is telling you that you are trying to use an undefined variable, and you've bolded the word "WScript" so we are to assume, I guess, that this is the undefined variable.

     

    Maybe if you show us the entire procedure (Sub or Function) we can help clarify why that variable isn't defined.

     

    • Tony2021's avatar
      Tony2021
      Steel Contributor
      Hello there George, thank you for your response. Sorry for my tardy reply. I have been swampted with my real job. I would really love to get this code working. Any assistance is greatly appreciated.
      To answer your queries:
      <So, are you trying to import data in Outlook from Excel from code running in an Access module? Or in Outlook? Or in Excel? (Well, three questions about one topic.)
      Answer: Yes. My data resides in Access, then I dump it to excel then upload into Outlook.
      <Maybe if you show us the entire procedure (Sub or Function) we can help clarify why that variable isn't defined.
      Yes, I think its in the zipped attachment? The function is called "OutlookCalendarScript" which is inside the text file.

      Let me know if there is something I have missed.

      • George_Hepworth's avatar
        George_Hepworth
        Silver Contributor
        Why move the data through Excel at all? I'm not sure I understand that part.
    • Tony2021's avatar
      Tony2021
      Steel Contributor

      George_Hepworth 

      ----Or---- it could be easier to provide guidance on how I could import the attached excel into Outlook.

       

       

      • George_Hepworth's avatar
        George_Hepworth
        Silver Contributor
        IF that is real data in the Excel file I suggest you delete it. It contains email addresses.

Resources