+ Reply to Thread
Results 1 to 3 of 3

PDF Export

  1. #1
    Registered User
    Join Date
    09-01-2016
    Location
    Portsmouth, England
    MS-Off Ver
    2016 Professional
    Posts
    2

    Question PDF Export

    Hello,

    I have a bit of a strange one here.

    I am using the following line to generate a pdf file from a word document:

    file.ExportAsFixedFormat OutputFileName:=path, ExportFormat:= _
    wdExportFormatPDF, OpenAfterExport:=False

    The file is created, but the columns in the resulting document are not aligned correctly (see screenshot).

    pdf1.jpg

    However if I manually I go to File > Export > Create PDF, the columns are displayed perfectly (see 2nd screenshot).

    pdf2.jpg


    Does anyone know why this might happen?

  2. #2
    Forum Expert Kenneth Hobson's Avatar
    Join Date
    02-05-2007
    Location
    Tecumseh, OK
    MS-Off Ver
    Office 365, Win10Home
    Posts
    2,573

    Re: PDF Export

    Welcome to the forum!

    Try recording a macro to make sure that you have the same options set.

  3. #3
    Registered User
    Join Date
    09-01-2016
    Location
    Portsmouth, England
    MS-Off Ver
    2016 Professional
    Posts
    2

    Re: PDF Export

    Thanks for the quick reply Kenneth.

    Recording a macro in Word was something I had tried earlier without success, the line it gave was:

    .ExportAsFixedFormat OutputFileName:=path_
    ExportFormat:=wdExportFormatPDF, OpenAfterExport:=False, OptimizeFor:= _
    wdExportOptimizeForPrint, Range:=wdExportAllDocument, From:=1, To:=1, _
    Item:=wdExportDocumentContent, IncludeDocProps:=True, KeepIRM:=True, _
    CreateBookmarks:=wdExportCreateNoBookmarks, DocStructureTags:=True, _
    BitmapMissingFonts:=True, UseISO19005_1:=False

+ 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. [SOLVED] VBA - Export PDF
    By Sh3a in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 12-15-2015, 05:45 PM
  2. Cannot export to XML
    By [email protected] in forum Excel General
    Replies: 0
    Last Post: 11-04-2014, 04:27 AM
  3. PDF Export
    By mariosmk555 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-04-2014, 08:52 PM
  4. Export XML using XSD
    By Kuesel in forum Excel General
    Replies: 1
    Last Post: 03-15-2013, 06:38 AM
  5. Macro to Export a Sheet but also export a macro?
    By ChrisF79 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-20-2013, 12:26 PM
  6. I would need a macro to export data from base example workbook to export worbook
    By slato8 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-01-2012, 11:21 AM
  7. Export
    By Ernst Guckel in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-25-2005, 09:06 PM

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