need excel vba help wtith making pdf files

Page 1 of 2 12 LastLast

  1. Posts : 7
    win 7 x64
       #1

    need excel vba help wtith making pdf files


    Hi, I would like to save my excel sheet as PDF + print that sheet on my local printer (so changing default printer to Adobe PDF printer will not work)

    I searched help database and I found two commands that by my logics could work - PRINTOUT and EXPORTASFIXEDFORMAT.
    Now for the first comand I wrote:
    Code:
     
    Sub Macro1()
    Application.Activate = "Adobe_PDF_Converter" 'that's how my pdf printer is labeld
    ActiveSheet.PrintOut prewiew:=False, _
    ActivePrinter:=Adobe_PDF_Converter, _
    printofile:=True, _
    PrToFileName:="C:\users\borut\desktop\primer.pdf"
    End Sub
    but I get the error
    runtime error '438':
    object doesn't support this property or method

    and for the second:
    Code:
     
    Sub Macro2()
    ActiveDocument.ExportAsFixedFormat OutputFileName:= _
    "C:\Users\borut\Desktop\test.pdf", ExportFormat:=xlTypePDF
    End Sub
    but I got the error:
    runtime error '424':
    object required
      My Computer


  2. Posts : 3,009
    Windows 7 Home Premium 64bit
       #2

    Here is a MicroSoft add-in for that purpose in Office 2007...
    Download details: 2007 Microsoft Office Add-in: Microsoft Save as PDF


    .
      My Computer


  3. Posts : 7
    win 7 x64
    Thread Starter
       #3

    Irene said:
    Here is a MicroSoft add-in for that purpose in Office 2007...
    Download details: 2007 Microsoft Office Add-in: Microsoft Save as PDF


    .
    Does anyone here read the questions???

    Office 2007+ allow to save as PDF, plus I have adobe PDF printer. What I need is help with the macro code!
      My Computer


  4. Posts : 12,012
    Windows 7 Home Premium SP1, 64-bit
       #4

    I have an Excel macro that works, but I am far far from an authority or knowledgeable. I eventually got it to work through fumbling, trial and error, and googling.

    Google generates 630,000 hits for "runtime error 438". I can only suggest you drill into some of them.

    But only 47 for "runtime error 434". Hmmmm.......................

    I'd look at 434 rather than 438.

    Microsoft used to have a series of Excel newsgroups, but I think they have been replaced by online forums similar to this one.

    Good luck. Put on your sheepskin chaps and put a knife in your teeth. You may be in for a long haul and a lot of frustration.

    But they are very cool when finished and they work!!
      My Computer


  5. Posts : 7
    win 7 x64
    Thread Starter
       #5

    ignatzatsonic said:
    I have an Excel macro that works, but I am far far from an authority or knowledgeable. I eventually got it to work through fumbling, trial and error, and googling.

    Google generates 630,000 hits for "runtime error 438". I can only suggest you drill into some of them.

    But only 47 for "runtime error 434". Hmmmm.......................

    I'd look at 434 rather than 438.

    Microsoft used to have a series of Excel newsgroups, but I think they have been replaced by online forums similar to this one.

    Good luck. Put on your sheepskin chaps and put a knife in your teeth. You may be in for a long haul and a lot of frustration.

    But they are very cool when finished and they work!!
    The answer should be simple and easy, of course for someone that knows where the problem is. I googled it, but as you mentioned did not help me, even with my knife beetwen my teeth.
      My Computer


  6. Posts : 12,012
    Windows 7 Home Premium SP1, 64-bit
       #6
      My Computer


  7. Posts : 3,009
    Windows 7 Home Premium 64bit
       #7

    mihael said:
    Irene said:
    Here is a MicroSoft add-in for that purpose in Office 2007...
    Download details: 2007 Microsoft Office Add-in: Microsoft Save as PDF
    Does anyone here read the questions???

    Office 2007+ allow to save as PDF, plus I have adobe PDF printer. What I need is help with the macro code!
    mihael said:
    The answer should be simple and easy, of course for someone that knows where the problem is. I googled it, but as you mentioned did not help me, even with my knife beetwen my teeth.
    I can certainly feel it!

    Did anyone mention to you that this is the season of goodwill?
    Attitude does not produce answers...

    .
      My Computer


  8. Posts : 7
    win 7 x64
    Thread Starter
       #8

    Irene said:
    Did anyone mention to you that this is the season of goodwill?
    Attitude does not produce answers...
    ...answers like yours are not even answers since you don't read a question. I don't want to be rude, but if I don't know a thing about a topic in the question I don't give a useless advice.
      My Computer


  9. Posts : 7
    win 7 x64
    Thread Starter
       #9

    ignatzatsonic said:
    I tried to register on the VBA Express Forum but I don't get any confirmation email on my gmail, I aslo sended email to administrator that I dind't receive their confirmation email and I didn't get any reply (that was three days ago)

    I aslo tried on VB.Forums and jet no answer...
      My Computer


  10. Posts : 1,483
    Windows 7 Ultimate x64 SP1
       #10

    mihael said:
    Irene said:
    Did anyone mention to you that this is the season of goodwill?
    Attitude does not produce answers...
    ...answers like yours are not even answers since you don't read a question. I don't want to be rude, but if I don't know a thing about a topic in the question I don't give a useless advice.
    Hang on, mihael! I've got the answer you are seeking, I use it all of the time in conjunction with my AutoCad Architecture PDF files I create for clients. I use Access to do general billing but create complicated bids with Excel, convert to a PDF and then print. I also prepare an email for the client by starting a new mail and attaching the PDF in the same VBA code.

    If you had been a little nicer I might have posted the code for you.
      My Computer


 
Page 1 of 2 12 LastLast

  Related Discussions
Our Sites
Site Links
About Us
Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 17:31.
Find Us