#1
|
||||
|
||||
Help with access Lists Gallery to Format all
Hello Pros,
I've been searching for months to find a way on my own, but I'm giving up and asking again for your guidance. When a PDF document is converted to Word, I find all the lists (numbers, alphabets, bullets), are either enlarged or reduced in size, so you can see in the Font window, under Advanced settings (2nd tab), the Scale is Not 100%, and often the Spacing is Not set to Normal. I've created for myself a macro to fix the Fonts to 100% and Spacing, as below: HTML Code:
With Selection.Font .Name = "" .Spacing = 0 .Scaling = 100 .Position = 0 .Kerning = 0 .Ligatures = wdLigaturesNone .NumberSpacing = wdNumberSpacingDefault .NumberForm = wdNumberFormDefault .StylisticSet = wdStylisticSetDefault .ContextualAlternates = 0 End With Numbered, Alphabetics, and Bullets. With all the levels, and including Multilevel, or single list. My Research on the topic, led me to understand, I need to access the List Galery.???? I'm still confused on this whole topic. Is it easily accessible? Is it doable? All combinations I do, do not work and can't find scripts about it, or I don't understand. Any insights you could share with me? Happy Easter by the way, and thanking you in advance Cendrinne |
#2
|
||||
|
||||
When a pdf is converted back to Word, the 'list' paragraphs are going to be hard coded. You might be allowing Word to convert these to actual lists but that would be secondary to the PDF to Word conversion. The code you posted doesn't make sense to me and it appears to be heading off in the wrong direction as it is applying local formatting in order to standardise. The correct approach would be to REMOVE local font formatting and if necessary, apply a style which does have the list settings. The style settings capture all the font and paragraph settings and should do everything you need apart from needing to restart list entries.
Code:
Selection.Font.Reset 'clears local font settings Selection.ParagraphFormat.Reset 'clears local paragraph settings WordBasic.ToolsBulletsNumbers Replace:=0, Type:=1, Remove:=1 'removes hard-coded list numbers/bullets Selection.Style = "List" 'applies a style which presumably has automatic numbering
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#3
|
||||
|
||||
Thank you, Andrew...let me explain further....
Quote:
2-You say you didn't understand my code, it's from the Find and Replace. So any font found, I wanted it to be at 100% size, etc. However this doesn't touch all the ''different lists''. 3- The PDF's, are given from a client, which we don't know what medium the document was done in. Would ''REMOVE local font formatting'', remove all the list? One solution I had found previously, was to convert the Word lists to text. Code:
ActiveDocument.ConvertNumbersToText Reason, I didn't want to do that, is because, when I send the document to another software, it removes all the lists (number, alpha, and bullets). But temporary, I wished to keep all the lists, until I was ready. It's to be able to compare my English document and French document, make sure all the lists and bullets and paragraph are are all there, before I send it off to another software, which will remove them. If I use Convert Numbers to Text, then it stay's there, so I have to use another macro to get rid of them before I send it to the other software. Maybe it's not doable, to find all the list at once, to affect the scaling. Your recent macro, could work, however, I need to find all the list names. Thank you, Andrew, regardless, it was nice discussing this issue with an expert. Cendrinne |
#4
|
||||
|
||||
Quote:
2. 100% size is a term relevant to html documents being viewed in a web browser. It isn't terminology used in Word formatting (other than perhaps if you are working in Web view and saving as html). Word sizes characters in points (there are 72 points in an inch). 3. Removing local font formatting allows Word to style the content according to the font attributes of the paragraph style applied to that content. All Word content is formatted firstly according to the style attributes and then it is overlaid with 'local font formatting' which records the variations from the style. It is those variations that you want to avoid - wherever possible you should get your formatting from the style and only the style. List formatting is a paragraph format, not a font format so removing font formatting will not get rid of a list element. However, changing paragraph formatting can get rid of (or apply) list formats.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#5
|
||||
|
||||
WOW, that is why you are an Expert, Andrew.
I'm going to have to reread all of this when I have more time. I think I got the idea of what you are saying, but not all. As for the 100%, I swear, Andrew, try yourself to convert a PDF you find online, (that has alpha numerical bullets), then convert it in Word. Click in a list type, on the alpha-numerical portion such as ==> ([a-z], [0-9]), Go To the Font window, click on the 2nd tab, look at scaling of the font. At times, you can see with the naked eye, there is something wrong with the font. Doesn't look like the wording beside it. ie: (i) or (ii) Tab Title of that list. I see an example in front of my eyes, that (ii) Scale = 95% and Spacing = 0.9 pt. So I've made myself a mission to figure it out to fix all instance in a word document. One day, I will, if no one else does it. Have a fantastic day, and again, it was truly enjoyable speaking to someone with such knowledge Cendrinne |
#6
|
||||
|
||||
Ahh, I see what you are looking at now. The scaling on the second tab is a distortion applied to the width of the characters. In the same area, the spacing is an adjustment of the spaces between letters. These settings can be fiddled but any variation from the default comes at the expense of legibility. So resetting them to default is a good thing to do.
Your styles should already be set to 100% scaling so you really only need to reset the font attributes to the style and hence all the individual settings, including scaling and spacing, fix themselves. This avoids the need to micromanage all of the font aspects individually and allows you to control the entire document's look at the style level.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#7
|
||||
|
||||
Well when we convert a PDF, which we don't know what was the source, it changes the scaling and spacing. That is the reason, I wanted to fix that in all instance in a word document.
Anyway, I found an interesting macro, to select in once intance, all the paragraph lists, and it seems to affect the Alpha-Numerical values as well. So you place the curser anywhere in the document, then click on macro, then click in the document again, you'll see it highlights all intance of lists. So change font size, change the font name. The only thing, it won't Affect the bullets, so if I say, change all list to Arial and font 12, it seemed to do it everywhere, except all bullets. So if I have 25 new bullets styles, in a very big document, it won't touch it. You have to manually find them. That isn't fun! Must be a magic way to fix all that? Any way, here is the macro to find and selects all instance of paragr lists: HTML Code:
On Error Resume Next Application.ScreenUpdating = False Dim Para As Word.Paragraph With ActiveDocument .DeleteAllEditableRanges (-1) For Each Para In .Paragraphs If Para.range.ListFormat.ListType > 0 Then Para.range.Editors.Add (-1) End If Next .SelectAllEditableRanges (-1) .DeleteAllEditableRanges (-1) End With Application.ScreenUpdating = True Cendrinne |
#8
|
||||
|
||||
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
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#9
|
||||
|
||||
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
Tags |
gallery, list indentation, list styles |
Thread Tools | |
Display Modes | |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Comparing two lists and extracting values missing from both lists | Dave T | Excel Programming | 4 | 11-01-2018 11:51 PM |
Creating global contact lists (distribution lists) Outlook 2011 Mac | pengyou | Outlook | 0 | 09-10-2016 02:18 PM |
I want to create a lists within lists (nested merges) | AndyS | Mail Merge | 10 | 12-11-2015 03:05 PM |
Add command (not gallery) to quick access toolbar | MarkPhil | Word | 3 | 02-16-2014 06:10 AM |
Project gallery | slidon | Word | 0 | 04-29-2013 07:22 AM |