# Aligning content of TOC through programming

Hello,
I want to know the code required to align the content (headings) of a TOC in word document through Visual Basic 6.0. I have attached two screen shots for your reference. First picture (CurrentScenario.jpg) shows the current scenario and the other picture (ExpectedScenario.jpg) show the expected scenario.

Also I have given below the existing Visual Basic 6.0 code that provides the existing alignment (current scenario) of the TOC in word document.

``````strAddedStyles = "Heading 1,1"

``````
CurrentScenario.jpg
ExpectedScenario.jpg
Microsoft WordProgramming Languages-OtherVisual Basic Classic

Last Comment
Gopinath74

8/22/2022 - Mon
Rgonzo1971

Hi,

Could you send a sample of you doc?

or have you checked whether all the references were in order

Regards