How to Set XPS printer when exporting as PDF file with different languages

Hello

It is my first question

I have an excel file to export as a pdf file ,i have to force the default printer to Microsoft XPS Document Writer

depending on languages ,the code should be adjusted as below

  • FR: Microsoft XPS Document Writer sur Ne00:
  • EN: Microsoft XPS Document Writer on Ne00:
  • IT : Microsoft XPS Document Writer su Ne00:

New countries are comming and i have to manage more and more languages by code

Is it possible to avoid this ?

Thanks

Naim

Hello,

In another sheet, you'll need to create a correspondence table in which you'll enter all the countries in column A and the associated printers in column B. Then, using the "VLOOKUP" function, you'll retrieve the printer corresponding to each country, as in the attached file.

Bonjour,
Une proposition.
Voir fichier pour un complément d'information (xlCountryCode or xlCountrySetting).
Cdlt.

11naimber.xlsm (16.29 Ko)
Public Sub Country_Setting()
Dim txt As String, v As Long, p As String
    v = Application.LanguageSettings.LanguageID(msoLanguageIDUI)
    Select Case v
        Case 1033: p = "on"
        Case 1036: p = "sur"
        Case 1040: p = "su"
        Case Else:
    End Select

    MsgBox "Microsoft XPS Document Writer " & p & " Ne00:"
End Sub

Tha,k you for your answers

My goal is to find a way to manage that without cases and avoid to manage a list of languages

Regards

Rechercher des sujets similaires à "set xps printer exporting pdf file different languages"