Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #7  
Old 04-08-2014, 05:12 PM
macropod's Avatar
macropod macropod is offline Problems setting HeadingFormat - and making it work Windows 7 32bit Problems setting HeadingFormat - and making it work Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,512
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

I tried to run your code, but it fell over as soon as I clicked the browse button, at:
Me.lblPresentationDirectory = "*PROJECT*" & Mid(Me.lblPresentationDirectory.Caption, l + 1)
with a compile error "can't find project or library".

Leaving that aside, I also had a look at your document. To be sure, the 'heading row repeat' option is checked, but the row doesn't repeat. But! Unchecking, then re-checking the option fixes the problem.

I also note that your code has a number of places where it's trying to manipulate the heading format:
Sub ProcessScriptBlock -
ScriptTable.Rows(RowCount).HeadingFormat = False

Function CreateScriptForPresentation -
If GenScript.CreateRecordingScript Then
RecordingScriptTable.Rows(1).HeadingFormat = True
RecordingScript.Close SaveChanges:=wdSaveChanges
End If
If GenScript.CreateShootingScript Then
ShootingScriptTable.Rows(1).HeadingFormat = True
ShootingScript.Close SaveChanges:=wdSaveChanges
End If

Sub InitiateScript -
ScriptTable.Rows(1).HeadingFormat = True

Might I suggest you leave all HeadingFormat manipulations till the very end, then use a simple loop like the following before saving:
Code:
Dim Tbl As Word.Table
For Each Tbl In WordApp.ActiveDocument.Tables
  With Tbl
    .Rows.HeadingFormat = False
    .Rows(1).HeadingFormat = True
  End With
Next
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems setting up email accounts. macc2014 Outlook 0 02-18-2014 12:36 PM
Problems setting HeadingFormat - and making it work work of labor vs work of excavator ketanco Project 1 02-11-2014 08:53 AM
Problems setting HeadingFormat - and making it work work vs regular work. and how regular work works user0044 Project 5 03-06-2012 07:28 AM
Problems setting HeadingFormat - and making it work Making the IF field work (not Mail Merge) Caroline Mail Merge 5 04-11-2011 04:17 PM
Problems setting HeadingFormat - and making it work Work Offline Setting thomas34461 Outlook 1 04-04-2011 01:42 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 12:10 PM.


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