+ Reply to Thread
Results 1 to 5 of 5

Macro/Page Setup Issue - Converting Excel to PDF

  1. #1
    Registered User
    Join Date
    01-06-2012
    Location
    Minnesota, USA
    MS-Off Ver
    Excel 2010, Excel 365
    Posts
    49

    Macro/Page Setup Issue - Converting Excel to PDF

    I created a form that co-workers can use to do a used evaluation on farm equipment. In this form I created an Email As PDF button. It basically converts the form to a PDF and attaches it to an email that already has the TO: and SUBJECT: lines filled out. It usually works great, but recently someone found an issue. When they use this button, the PDF version sometimes ends up like the attached "Incorrect" pdf instead of the "Correct" pdf. Anyone have any ideas what's going on?

    If you would like to look at the Excel workbook, please message me with an email address - the file is to large to upload here.

    Thank-you for any insight!
    Attached Files Attached Files

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,957

    Re: Macro/Page Setup Issue - Converting Excel to PDF

    Normally we like to work with sample workbooks which means they have enough data to prove the point and not the entire history of the company. Try cutting down the amount of data to several dozen or several hundred records. If that doesn't do it, then save the file in XLSB format (they can be 40% smaller) and finally, if that doesn't work, compress the workbook and attach the *.zip file to the post.
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Registered User
    Join Date
    01-06-2012
    Location
    Minnesota, USA
    MS-Off Ver
    Excel 2010, Excel 365
    Posts
    49

    Re: Macro/Page Setup Issue - Converting Excel to PDF

    Ok, I deleted several sheets and modules and was able to get the size down. Hopefully it still works like it should.

    To unlock it, run the AA_Unpackage macro, the password is UECALC.
    The AA_EmailAsPDF macro is in the AA_MasterCodes module.

  4. #4
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,957

    Re: Macro/Page Setup Issue - Converting Excel to PDF

    I commend you on a very thorough attempt to make this application portable and creating the form must have taken days. You put a lot of good work into this.

    I noticed that as I stepped through the code, that it detected my OS as Windows 7 - 32 Bit. My system is Windows 7 - 64 Bit. Nonetheless, I produced a good PDF file. I also conducted a test with my laptop (Windows 7 - 32 Bit) and it identified the OS correctly and produced a good PDF file. So I have not been able to duplicate the bad condition.

    I suggest that this might be the area to investigate. Hopefully you can round up different machines with the various OS. Hopefully some people will chime in here.

    A note to testers, comment out the if statement that checks if all the questions have been answered. The macro is in the module AA_Master_Codes. Otherwise it will take a while to fill the form out. Fill in the information for Machine SN and Machine Stock # as these fields are used to create the file name. The file should wind up on your desktop.

  5. #5
    Registered User
    Join Date
    01-06-2012
    Location
    Minnesota, USA
    MS-Off Ver
    Excel 2010, Excel 365
    Posts
    49

    Re: Macro/Page Setup Issue - Converting Excel to PDF

    We figured out what was causing the issue. The user that was having the issues was frequently printing labels in Excel via a label printer. So, before he clicks the button to email or save the file as a PDF, I have him go to the print screen and chooses a printer that's not the label printer and then go back and click the buttons. This seems to have fixed it.

    Excel thinks strangely sometimes....

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. VB Macro to do page setup
    By rizmomin in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-06-2014, 10:42 AM
  2. Page setup macro
    By jsmity in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-28-2010, 10:48 AM
  3. excel 4 macro - page.setup
    By rgarber1950 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-20-2007, 10:33 AM
  4. [SOLVED] What does &L& mean in a page setup macro?
    By Bonnie June in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 07-26-2006, 06:35 PM
  5. [SOLVED] Excel Page Setup - Fit To Page option
    By sujatha_krao@hotmail.com in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-05-2006, 07:45 PM
  6. [SOLVED] Page Setup Macro
    By Darin Kramer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-21-2005, 02:05 PM
  7. Page Setup by macro
    By Repeat3 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-29-2005, 08:37 AM

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1