+ Reply to Thread
Results 1 to 2 of 2

Macro to generate PDF's instead generates Excel files

Hybrid View

ShamusVW Macro to generate PDF's... 06-11-2010, 05:50 AM
royUK Re: Macro to generate PDF's... 06-11-2010, 01:01 PM
  1. #1
    Registered User
    Join Date
    06-11-2010
    Location
    Pitermaritzburg, South Africa
    MS-Off Ver
    Excel 2007
    Posts
    1

    Macro to generate PDF's instead generates Excel files

    Hi

    I recorded a macro to generate a pdf (Excel 2007) to be sent via email. On the recording part, it does what is needed, but when I try run it again, it generates an Excel type file as the attachment!

    I tried it on a different computer (also Excel 2007) with same results. Am I missing something?
    This is the VB code...

       ActiveWorkbook.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
           "C:\Users\VANWYN~1\AppData\Local\Temp\testin.pdf", Quality:= _
           xlQualityStandard, IncludeDocProperties:=False, IgnorePrintAreas:=False, _
           OpenAfterPublish:=False
       Application.Dialogs(xlDialogSendMail).Show
    Regards,
    Shaun

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Macro to generate PDF's instead generates Excel files

    See

    http://msdn.microsoft.com/en-us/libr...ffice.11).aspx
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1