Hello World!
I'm not sure if this is the right section to post this, but I'm needing some help.
As of the beginning of July my company opted to ditch Microsoft Office (To cut expenses) and moved to Google.
And that ruined a lot of my macros. I have no idea of how to script in google but I've been trying.
One of the most important sheets that we have is one that sends important info to suppliers.
First let me lay down an example of how the sheet is.
[TABLE="width: 500"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 500"]
<tbody>[TR]
[TD]Sheet Name[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Current Month[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Supplier[/TD]
[TD]Supplier Code[/TD]
[TD]SDE[/TD]
[TD]SDE EMAIL[/TD]
[TD]Supplier Email[/TD]
[TD]Comercial Email (IF ANY)[/TD]
[TD]Send Mail?[/TD]
[/TR]
[TR]
[TD]John Doe Co.[/TD]
[TD]022331[/TD]
[TD]Mr. Smith[/TD]
[TD]smith@example.com[/TD]
[TD]johndoe@company.com[/TD]
[TD]none[/TD]
[TD]Y/N[/TD]
[/TR]
</tbody>[/TABLE]
Now, I'll try to explain how it used to work.
By hitting the Yes button in the column G, the macro looked for the current month in D4, and the information for the supplier where the Yes button was clicked. Looked for supplier name and send an email to him and with a copy for the SDE and Commercial Email.
The email used to say something like "Hello Mr. John Doe, here's the report of your company in the month of xx." Alongside with another info for the company, containing a PDF that was uploaded to the email from the pc.
My question here is, how to code it for google scripts, so it gets the file from Google Drive? It's driving me nuts, I've managed to make the script send the email but I just can not make it get the file from the Google Drive.
If you guys need the code, let me know and I'll do my best to help as I can.
Thanks and I wish you all a Wonderful weekend
I'm not sure if this is the right section to post this, but I'm needing some help.
As of the beginning of July my company opted to ditch Microsoft Office (To cut expenses) and moved to Google.
And that ruined a lot of my macros. I have no idea of how to script in google but I've been trying.
One of the most important sheets that we have is one that sends important info to suppliers.
First let me lay down an example of how the sheet is.
[TABLE="width: 500"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="width: 500"]
<tbody>[TR]
[TD]Sheet Name[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]Current Month[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Supplier[/TD]
[TD]Supplier Code[/TD]
[TD]SDE[/TD]
[TD]SDE EMAIL[/TD]
[TD]Supplier Email[/TD]
[TD]Comercial Email (IF ANY)[/TD]
[TD]Send Mail?[/TD]
[/TR]
[TR]
[TD]John Doe Co.[/TD]
[TD]022331[/TD]
[TD]Mr. Smith[/TD]
[TD]smith@example.com[/TD]
[TD]johndoe@company.com[/TD]
[TD]none[/TD]
[TD]Y/N[/TD]
[/TR]
</tbody>[/TABLE]
Now, I'll try to explain how it used to work.
By hitting the Yes button in the column G, the macro looked for the current month in D4, and the information for the supplier where the Yes button was clicked. Looked for supplier name and send an email to him and with a copy for the SDE and Commercial Email.
The email used to say something like "Hello Mr. John Doe, here's the report of your company in the month of xx." Alongside with another info for the company, containing a PDF that was uploaded to the email from the pc.
My question here is, how to code it for google scripts, so it gets the file from Google Drive? It's driving me nuts, I've managed to make the script send the email but I just can not make it get the file from the Google Drive.
If you guys need the code, let me know and I'll do my best to help as I can.
Thanks and I wish you all a Wonderful weekend
Last edited: