tempfilename

  1. S

    Strange attachment on automated email

    Hello, I have a macro that automatically sends an email with a copy of the workbook as an attachment. I recently made a slight change to add an extra cell value on to the name of the attachment and since then a number of users when they send the email have additional system file attachments on...
  2. T

    VBA Code to send two separate Emails

    Hi All, The below code is currently part of one of my subs, It’s toautomatically send an email when a button is pressed in the worksheet. Myquestion is how can I change this to make it send two separate emails withdifferent bodies and recipients? Thanks in Advance Tom Dim wb1 As Workbook...
  3. T

    Send Email from Excel - Error in Macro

    Hello, I came up with the below code in order to send an excel file from VBA leveraging outlook. While some part of the code works, I'm stuck when Excel is not opened /or is opened. I got an error. I have highlighted the part I'm struggling with in red. Any idea what I have to adjust? Thank you...
  4. O

    Runtime Error 1004: Method Range of Object _Global Failed

    Hi All I have a file with a macro that works in the original file, but when I copied the file to make my own changes, the macro no longer works in the copied file. I get a Error code 1004 Method Range of Object _Global Failed on the highlighted line of code, which is trying to set rng = Range...
  5. C

    VBA Save_Email_Delete Sheet

    Hi, I have a workbook that I would like to save a copy in a particular folder with naming. I would then like to email it, and then close the file. I have used the below macro for this, however users are receiving an error on line: With Destwb .SaveAs TempFilePath & TempFileName &...
  6. B

    Run time error '1004' - Method 'Range' of object '_Global' failed

    I am pulling my hair out in big clumps trying to resolve this. When the macro fails and I get the error message in the Title block it highlights the following line; Range("VERSION").FormulaR1C1 = TempVersion I assume that I've not properly defined something but I'm wearing my Captain ADHD hat...
  7. L

    VBA error issue

    Hi i got this code from a previous project. It is to send an excel sheet to a person. in my .to i put a value "B2" this should be normally an email address or something that in outlook converts to an email address. But in some cases it is not a valid email adress and VBA just handle it if...
  8. L

    Kill Function will not delete the file

    Looks fairly simple - Code runs just like it knows what to do and then nothing File resides on Desktop and .Fullname does return the correct path tempFileName = targetWorkbook.FullName 'MsgBox "Target Workbook Name = " & tempFileName targetWorkbook.Save targetWorkbook.Close...
  9. L

    Send email using Oulook365

    I have the following code in a workbook with employees to submit monthly timesheets. It was working fine with Outlook, but we have recently been migrated to Office365 and no longer have access to Outlook. How can I get the code to work with Outlook365? Sub EmailJan() 'PURPOSE: Create email...
  10. J

    vba code to create a pdf giving error message

    My code is as follows: I am getting the error message Run-time error '-2147024773 (8007007b)': Document not saved. I have no idea what is wrong with the code - can anyone help ?
  11. J

    vba script to copy modules from one book to another

    Hi, I am hoping that someone can help with this query. I have a worksheet that get populated with information and then I have some vb code that when requested, it copies the sheets and attaches it to an email ready for sending. The original sheet has a number of modules, what I am trying to...
  12. D

    Copy Pictures from worksheet and add as Outlook attachments

    Have been searching for hours and can't find anything to answer this... I have a worksheet that users will insert pictures (jpeg, gif etc.) as visual aids. What I would like is a way to extract all of the object images present on the worksheet and insert them as attachments in an Outlook email...
  13. G

    Open XLTM file > Click on Macro button > send as XLSM attachment in a outlook message

    Hi VBA's, I originally had an XLSM file with a macro button to send the file as attachment in an outlook message. I wish to save this XLSM as a template (XLTM ) but when i did that the sent attachment is without file extension. and i need it to be with XLSM Can you please tell me what should...
  14. S

    Macro to Save file both as an excel macro-enabled workbook and PDF and attach to an email

    Hi, I have this nifty macro that saves a temp copy of the workbook and attaches it to an email. After a copy has been attached, it then deletes that temp copy. It works perfectly right now, but I was wondering if it could be possible to have it also save the workbook as a PDF and attach it to...

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top