| Windows 7: need excel vba help wtith making pdf files |
26 Dec 2010
|
#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 System Specs |
| OS win 7 x64 CPU e6550 Motherboard intel Graphics Card gf8600gt |
27 Dec 2010
|
#2 | | Windows 7 Home Premium 64bit Stafford, England |
| My System Specs | | Computer type PC/Desktop System Manufacturer/Model Number Packard Bell OS Windows 7 Home Premium 64bit CPU Intel(R) Core(TM) i3-2120 CPU @ 3.30GHz Motherboard Packard Bell IPISB-AG Memory 3.00 GB Graphics Card (1) Intel(R) HD Graphics (2) VNC Mirror Driver Sound Card Realtek High Definition Audio Monitor(s) Displays AIO LCD Screen Resolution 1920 x 1080 Keyboard Wireless Mouse Wireless Hard Drives WDC WD10EADX-22TDHB0 ATA Device
Fixed hard disk media
4 partitions
931.51 GB Antivirus Microsoft Security Essentials Browser IE; Firefox Other Info Also:
Samsung N220 Plus Netbook - Windows 7 Home
HP laptop
iPad 5 |
27 Dec 2010
|
#3 | | |

Quote: Originally Posted by Irene 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 System Specs | | OS win 7 x64 CPU e6550 Motherboard intel Graphics Card gf8600gt |
27 Dec 2010
|
#4 | | Windows 7 SP1, Home Premium, 64-bit |
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 System Specs | | System Manufacturer/Model Number Ignatz Special; 4 speed manual gearbox; factory air conditioning; one of one OS Windows 7 SP1, Home Premium, 64-bit CPU Intel Sandy Bridge i5-2500, not overclocked Motherboard Gigabyte H67A-UD3H-B3, full ATX Memory 4 GB Crucial DDR3-1333 Graphics Card none; graphics are integrated on CPU Sound Card onboard: Realtek ALC892; external: USB Behringer UF0-202 Monitor(s) Displays NEC 90GX2-BK 19" LCD Screen Resolution 800 x 640 Keyboard Leopold Tenkeyless with Cherry Blue switches, USB Mouse Logitech or Microsoft optical wired; either USB or PS 2 PSU Seasonic SS-560KM, modular Case Antec Solo II Cooling CPU: Scythe Big Shuriken; Case: Scythe Slipstream 800 & 500 Hard Drives System: Intel 320 Series SSD, 80 GB;
Data: Samsung Spinpoint 103SJ, 1 TB;
Backup: WD Caviar Green WD15EADS-00P8B0, 1.5TB Other Info Power consumption of this system, including monitor: 68 watts at idle; 144 watts at full load |
27 Dec 2010
|
#5 | | |

Quote: Originally Posted by ignatzatsonic 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 System Specs | | OS win 7 x64 CPU e6550 Motherboard intel Graphics Card gf8600gt |
27 Dec 2010
|
#6 | | Windows 7 SP1, Home Premium, 64-bit |
| My System Specs | | System Manufacturer/Model Number Ignatz Special; 4 speed manual gearbox; factory air conditioning; one of one OS Windows 7 SP1, Home Premium, 64-bit CPU Intel Sandy Bridge i5-2500, not overclocked Motherboard Gigabyte H67A-UD3H-B3, full ATX Memory 4 GB Crucial DDR3-1333 Graphics Card none; graphics are integrated on CPU Sound Card onboard: Realtek ALC892; external: USB Behringer UF0-202 Monitor(s) Displays NEC 90GX2-BK 19" LCD Screen Resolution 800 x 640 Keyboard Leopold Tenkeyless with Cherry Blue switches, USB Mouse Logitech or Microsoft optical wired; either USB or PS 2 PSU Seasonic SS-560KM, modular Case Antec Solo II Cooling CPU: Scythe Big Shuriken; Case: Scythe Slipstream 800 & 500 Hard Drives System: Intel 320 Series SSD, 80 GB;
Data: Samsung Spinpoint 103SJ, 1 TB;
Backup: WD Caviar Green WD15EADS-00P8B0, 1.5TB Other Info Power consumption of this system, including monitor: 68 watts at idle; 144 watts at full load |
27 Dec 2010
|
#7 | | Windows 7 Home Premium 64bit Stafford, England |

Quote: Originally Posted by mihael 
Quote: Originally Posted by Irene 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! 
Quote: Originally Posted by mihael 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 System Specs | | Computer type PC/Desktop System Manufacturer/Model Number Packard Bell OS Windows 7 Home Premium 64bit CPU Intel(R) Core(TM) i3-2120 CPU @ 3.30GHz Motherboard Packard Bell IPISB-AG Memory 3.00 GB Graphics Card (1) Intel(R) HD Graphics (2) VNC Mirror Driver Sound Card Realtek High Definition Audio Monitor(s) Displays AIO LCD Screen Resolution 1920 x 1080 Keyboard Wireless Mouse Wireless Hard Drives WDC WD10EADX-22TDHB0 ATA Device
Fixed hard disk media
4 partitions
931.51 GB Antivirus Microsoft Security Essentials Browser IE; Firefox Other Info Also:
Samsung N220 Plus Netbook - Windows 7 Home
HP laptop
iPad 5 |
27 Dec 2010
|
#8 | | |

Quote: Originally Posted by Irene 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 System Specs | | OS win 7 x64 CPU e6550 Motherboard intel Graphics Card gf8600gt |
27 Dec 2010
|
#9 | | |

Quote: Originally Posted by ignatzatsonic 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 System Specs | | OS win 7 x64 CPU e6550 Motherboard intel Graphics Card gf8600gt |
27 Dec 2010
|
#10 | | Windows 7 Ultimate x64 SP1 |

Quote: Originally Posted by mihael 
Quote: Originally Posted by Irene 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 System Specs | | System Manufacturer/Model Number Toshiba L355D OS Windows 7 Ultimate x64 SP1 CPU Core2 Duo Motherboard Intel Memory 4 GB Graphics Card GM965 on-board Sound Card RealTek on-board Monitor(s) Displays 19"+17"(laptop) Screen Resolution 1440x900 (x 2) PSU N/A Case N/A Cooling N/A Hard Drives 500GB Ext. 200GB Internal need excel vba help wtith making pdf files problems? All times are GMT -5. The time now is 09:53 AM. | |