Results 1 to 6 of 6

Thread: Macro to convert file into PDF and then send via email

  1. #1
    Join Date
    Nov 2009
    Posts
    33

    Macro to convert file into PDF and then send via email

    For the job I created a little macro. This macro starts each time you open the workbook and check the dates and sends an email based on the result. So far no worries. But I do not want to send Excel file as it is. The best thing would be to find the function that goes with the button sending a mail in the Excel toolbar, which is to send an image file. Solution is less appropriate to record such as PDF and then send it and then delete the pdf. FYI I work under Windows 2000 and Office 2000. Is there someone who can help me! How can you create a macro to convert a file into a PDF and then send it via email?

  2. #2
    Join Date
    May 2008
    Posts
    2,389

    Re: Macro to convert file into PDF and then send via email

    In 2007, I recorded a macro that gives this:

    ActiveWorkbook.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
    "C:\Users\myname\AppData\Local\Temp\File1.pdf", Quality:= _
    xlQualityStandard, IncludeDocProperties:=False, IgnorePrintAreas:=False, _
    OpenAfterPublish:=False
    Application.Dialogs(xlDialogSendMail).Show

    Does this help you in someway?

  3. #3
    Join Date
    May 2008
    Posts
    2,297

    Re: Macro to convert file into PDF and then send via email

    Can you just specify the need to modify "myname & File1.pdf" characters as parameters, if you will forgive the intrusion?

    but: \AppData\Local\Temp\ I have not understood? Why it should be located at this location?

  4. #4
    Join Date
    May 2008
    Posts
    2,389

    Re: Macro to convert file into PDF and then send via email

    I did not pursue the matter, I just saved the macro in Excel 2007 and I posted in case. If I have time (not too much the case now), I drown in xldialogsendmail to refine. Unless someone knows the answer.

  5. #5
    Join Date
    Nov 2009
    Posts
    33

    Re: Macro to convert file into PDF and then send via email

    Good evening and thank you. The problem for me is that the file will be opened at the same time as windows and everything should be automatic. For the person who uses the result of the macro must have nothing to do but to receive the mail which warns that there is a specific task to perform.

  6. #6
    Join Date
    Oct 2005
    Posts
    2,393

    Re: Macro to convert file into PDF and then send via email

    Excel 2007 SP2 includes an addin to export to PDF which is not the case in previous versions. So you'll have to go through Acrobat Distiller (paid) or PDFCreator (free) or others (CutePDF, etc.) or services as pdfonline.com.

Similar Threads

  1. Need help to convert a Text file to Excel via VBA Macro
    By DEvOTeEL in forum MS Office Support
    Replies: 1
    Last Post: 24-02-2012, 01:47 PM
  2. Replies: 3
    Last Post: 25-01-2012, 12:03 PM
  3. Replies: 2
    Last Post: 11-01-2012, 06:06 PM
  4. Use of Batch File to Send Email
    By samualres in forum Technology & Internet
    Replies: 5
    Last Post: 26-12-2009, 02:30 PM
  5. How to send a large video file via email
    By Yudhajit in forum Technology & Internet
    Replies: 3
    Last Post: 23-05-2009, 07:25 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,061,266.58036 seconds with 17 queries