ExportAsFixedFormat VBA excel changing fonts

L

Legacy 93538

Guest
Good Morning,

I was wondering if anyone knew why ExportAsFixedFormat function excel VBA changes font from excel to PDF?

Currently i have a macro which goes though a range of cells and then exports a copy to PDF for each value, however one of cells in the excel sheet been saved to PDF uses a barcode font (IDAutomationHC39M). When it exports to PDF the font on these cells is being changed to ariel.

I have printed to PDF and the barcode is there and displaying fine in the PDF but when i use ExportAsFixedFormat the barcode font disappears.

Does anyone know what might causing this?

Currently i line of code i am using is
VBA Code:
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=FolderPath & cell.Value

any help would be appreciated. Thank you in advance
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Just so any one suggests i just noticed i left & ".pdf" off the end of the file name so i just added and also tired including the IncludeDocProperties option and still the barcode font converts to arial

VBA Code:
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=FolderPath & cell.Value & ".pdf", Quality:=xlQualityStandard, _
        IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=True
 
Upvote 0
so i have found the solution. Was a bit odd but what i did was I went into File >> Export >> Create PDF/XPS. then i selected options (under neither the optimize options) and ticked the PDF/A complaint tick box. then closed all these windows. After that my code is now working and the barcodes are displaying on the PDF.

If anyone could tell my why this worked that would be helpful as i am not 100% sure why that worked?
 
Upvote 0
Solution

Forum statistics

Threads
1,215,694
Messages
6,126,258
Members
449,307
Latest member
Andile

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top