Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 09-11-2023, 08:11 PM
Journeyman Journeyman is offline Restarting a List Windows 10 Restarting a List Office 2019
Novice
Restarting a List
 
Join Date: Feb 2023
Posts: 15
Journeyman is on a distinguished road
Default Restarting a List

Hi All,

I am inserting an HTML file into a word table
Code:
    Set rngTarget = Mod_Tables.WrdTbl3.Cell(1, 1).Range
    Set FSO = CreateObject("Scripting.FileSystemObject")
    strTempFile = FSO.getspecialfolder(2) & "\" & FSO.GetTempName & ".htm"
    Set f = FSO.createtextfile(strTempFile, True)
    f.write strHTMLText
    f.Close
    Set f = Nothing
    rngTarget.InsertFile strTempFile

Easy enough. The above inserts the HTML file directly into the place I need it, however, the HTML output contains lists. And when it dumps the file into the document the list continues from its previous list.

So after a bit of hunting I found something like this:

Code:
Dim aList As ListFormat
Set aList = rngTarget.ListFormat
aList.ApplyListTemplate ListTemplate:=aList.ListTemplate, ContinuePreviousList:=False
This is not right. The first problem is that I need to identify the first list item, and make it continuous. not every item.

I can loop every para in the table, but how can I know it's the first list item and how can I reset it to 1?



Thanks in advance.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Restarting a List Multilevel list level 6 not restarting after level 5 Venteux Word 12 04-22-2022 06:43 AM
Restarting a List Figure #s keep restarting at 2 sherrirbgr Word 2 04-25-2018 08:07 AM
Restarting numbered lists in each Heading section with VBA CN13579 Word VBA 2 11-02-2016 11:54 AM
Restarting a List RESTARTING page numbering in a sectioned document. jp91306 Word 3 01-01-2016 12:27 AM
Restarting a List Numbering not restarting at 1 between list styles cotjoey Word 11 09-21-2014 07:54 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:01 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft