View Single Post
 
Old 04-12-2021, 04:42 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,977
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

I haven't seen multi-range selections in code before and that looks like an interesting avenue to explore.

If you are looking for a 'magic' way to apply styles in PDF conversions, I would consider trying the Autoformat command which is as close to vba magic as I've seen.
Code:
  With Options
    .AutoFormatPreserveStyles = False
    .AutoFormatApplyHeadings = True
    .AutoFormatApplyLists = True
    .AutoFormatApplyBulletedLists = True
    .AutoFormatApplyOtherParas = True
    .AutoFormatReplaceHyperlinks = True
    .AutoFormatReplaceQuotes = False
    .AutoFormatReplaceSymbols = False
    .AutoFormatReplaceOrdinals = False
    .AutoFormatReplaceFractions = False
    .AutoFormatReplacePlainTextEmphasis = False
    .AutoFormatPlainTextWordMail = True
    .LabelSmartTags = False
  End With
  Selection.Range.AutoFormat
If that doesn't work, post a sample document so I can see what you are actually looking at.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote