Hi,
I was able to run below code however to no avail, the excel file is empty. Can someone help me fix the problem? Why is it that email is not transferring to excel?
Looking forward for your assistance.
Hi,
I was able to run below code however to no avail, the excel file is empty. Can someone help me fix the problem? Why is it that email is not transferring to excel?
Looking forward for your assistance.
What is it that you expect this code to do?
Offhand, I see that you have a comment that you save the workbook, but you don't actually save it to the specified path, you just close it.
The new workbook has been saved however, the file is empty when I opened it. I am not sure what went wrong in the code. The macro failed to copy the email as what I wanted in the excel file. Can you please point out what will be the code I should use?
Please post your code instead of a picture of your code. Pictures are not useful for code--we can't copy it to test it, or modify it for you.
You are creating both an Excel application and and Outlook application in this code, which you never use. Then you create another Excel application. Are you running this code in Outlook or Excel?
Other than cleaning that up, I would add a line that says
before you close the workbook.Please Login or Register to view this content.
Hi,
Please be advised that the excel automatically save on the shared drive. Hoever, when I open it, the excel file is empty. It seems that the code was not able to read and write the contents from email to excel. Here's the code:
Thanks in advance.Please Login or Register to view this content.
Last edited by 6StringJazzer; 10-15-2019 at 10:52 AM.
Moderator's note: Please take the time to review our rules. There aren't many, and they are all important. Rule #2 requires code tags. I have added them for you this time because you are a new member. --6StringJazzer
Last edited by 6StringJazzer; 10-15-2019 at 10:58 AM.
I cannot even run this code because I get a compile error here. I am unclear on how you are getting this to run. GetSharedDefaultFolder has two required arguments.
typemismatch.JPG
Also, I asked "Are you running this code in Outlook or Excel?" Since the code calls Application methods in Outlook I am going to assume this code is in Outlook.
This code has many problems in it, especially undeclared variables. I have fixed as many as I could to get it to run, but I could not get it to produce an Excel file.
I am especially having trouble with GetSharedDefaultFolder. I am not familiar with that method and can't get it to work.
The line
is a poor practice here because it hides errors. You are almost certainly getting an error that is ignored and that is why your file is blank. I suggest commenting out this line, running it again, and then report back to tell us what error you get.Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks