Hej knseeberg
Det tal du får ud, svarer til papirstørrelsen, som du kan finde i hjælp.
Her har jeg samlet dem sammen og lavet en funktion.
Den virker for A4-A5. Du må selv udfylde resten.
Hvis du bruger special størrelser, kan det være nødvendigt at bruge .pageheight eller .pagewidth.
Function GetPaperSize() As String
Select Case ActiveDocument.PageSetup.PaperSize
Case wdPaper10x14: Stop
Case wdPaper11x17: Stop
Case wdPaperA3: GetPaperSize = "A3"
Case wdPaperA4: GetPaperSize = "A4"
Case wdPaperA4Small: Stop
Case wdPaperA5: GetPaperSize = "A5"
Case wdPaperB4: Stop
Case wdPaperB5: Stop
Case wdPaperCSheet: Stop
Case wdPaperCustom: Stop
Case wdPaperDSheet: Stop
Case wdPaperEnvelope10: Stop
Case wdPaperEnvelope11: Stop
Case wdPaperEnvelope12: Stop
Case wdPaperEnvelope14: Stop
Case wdPaperEnvelope9: Stop
Case wdPaperEnvelopeB4: Stop
Case wdPaperEnvelopeB5: Stop
Case wdPaperEnvelopeB6: Stop
Case wdPaperEnvelopeC3: Stop
Case wdPaperEnvelopeC4: Stop
Case wdPaperEnvelopeC5: Stop
Case wdPaperEnvelopeC6: Stop
Case wdPaperEnvelopeC65: Stop
Case wdPaperEnvelopeDL: Stop
Case wdPaperEnvelopeItaly: Stop
Case wdPaperEnvelopeMonarch: Stop
Case wdPaperEnvelopePersonal: Stop
Case wdPaperESheet: Stop
Case wdPaperExecutive: Stop
Case wdPaperFanfoldLegalGerman: Stop
Case wdPaperFanfoldStdGerman: Stop
Case wdPaperFanfoldUS: Stop
Case wdPaperFolio: Stop
Case wdPaperLedger: Stop
Case wdPaperLegal: Stop
Case wdPaperLetter: Stop
Case wdPaperLetterSmall: Stop
Case wdPaperNote: Stop
Case wdPaperQuarto: Stop
Case wdPaperStatement: Stop
Case wdPaperTabloid: Stop
End Select
End Function
Med venlig hilsen
www.cadmageren.dk
Michael Christoffersen
"Enkle Løsninger - Stor Effekt"