#1
|
|||
|
|||
EXCEL 2007 - Create PDF
Hello,
I have Excel 2007, get an error when running the following code to create PFD. I can save the exact code and run it on Office360 no problem. I'm interested to know if it's my '07' version or does my machine require an Add-in to run it? Also, apologies regarding my post description, I posted accidentally before completing. '------------------------------------------------- Sub CreatePDF() Worksheets("SCHEDULES").Activate Dim dte As String Dim Adr As String Dim IDw As String Dim path As String Dim fname As String dte = Range("H3").Text Adr = Range("G2").Text IDw = Format(dte, "medium Date") path = "C:\Users\.....\....." fname = Adr & ", " & IDw & ".pdf" ActiveSheet.ExportAsFixedFormat _ Type:=xlTypePDF, _ Filename:=path & fname, _ IgnorePrintAreas:=False ' ,_ ' OpenAfterPublish:=False End Sub '----------------------------------------------- Last edited by psyclone; 01-02-2023 at 06:04 PM. Reason: Posted accidentally before completion |
#2
|
||||
|
||||
Should there be one more backslash at the end of:
path = "C:\Users\.....\.....\" What is the error saying. What line of code is highlighted when you choose Debug? |
#3
|
|||
|
|||
Quote:
Please see attached (I've edited the path in attachment also for privacy). The path leads to the desktop. |
#4
|
||||
|
||||
Do you have at least SP2 installed with 2007? Prior to that you needed a separate add-in for exporting to PDF.
|
#5
|
|||
|
|||
Quote:
Download 2007 Microsoft Office Add-in: Microsoft Save as PDF or XPS 12.0.4518.1014 for Windows - Filehippo.com Last edited by psyclone; 01-04-2023 at 02:40 AM. Reason: added url |
#6
|
||||
|
||||
You really ought to install the service packs. Prior to SP2, Office 2007 was barely usable.
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to create microsoft Excel 2007 and 2010 File in .xlsx format | ipacesetters | Excel | 1 | 12-16-2019 05:13 PM |
How to create Sparklines in older versions of excel. (Excel 2007 and older) | Nicewithit | Excel | 0 | 04-18-2018 08:21 PM |
Mail merge from excel - need to create sheets and create a table | bluenosebex | Mail Merge | 5 | 08-02-2015 05:34 PM |
Create SVG with PPT 2007? | qa1952 | PowerPoint | 0 | 07-14-2015 12:24 PM |
How to create a resizeable simple checkbox Excel 2007 | Imageman100 | Excel | 1 | 01-10-2014 11:53 PM |