Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 02-24-2017, 02:46 AM
lodi123 lodi123 is offline Problem with table grid when selecting status in ribbon Windows 7 32bit Problem with table grid when selecting status in ribbon Office 2010 32bit
Novice
Problem with table grid when selecting status in ribbon
 
Join Date: Feb 2017
Posts: 10
lodi123 is on a distinguished road
Default Problem with table grid when selecting status in ribbon

Hello,

I'm stuck with another problem. I hope you can help me!
So in my document I have a table with help text that says to select the right status (3 choices) in the custom ribbon.
In most cases, when selecting a status, this table disappears and the choosen status appears in a new table.
In some cases, I get an error message that says the fault lies with the Style = Table Grid.
Everytime I get this error, my Word window also says Compatibility Mode, even though it's the same Word version as in the non-error case.
Is this because in the compatibility mode, there is no such style as table grid?


Sub ApplyStandardWorkflow(Control As IRibbonControl)
With ActiveDocument
Dim oRng As Range

Set oRng = ActiveDocument.Tables(2).Rows(1).Cells(1).Range
oRng.End = oRng.End - 1 'to exclude the end of cell marker
oRng.Select
Selection.Tables(1).Select
Selection.Rows.Delete
Selection.TypeBackspace


Selection.TypeParagraph
ActiveDocument.Tables.Add Range:=Selection.Range, NumRows:=1, NumColumns:= _
1, DefaultTableBehavior:=wdWord9TableBehavior, AutoFitBehavior:= _
wdAutoFitFixed
With Selection.Tables(1)
If .Style <> "Table Grid" Then
.Style = "Table Grid"
End If
.ApplyStyleHeadingRows = True
.ApplyStyleLastRow = False
.ApplyStyleFirstColumn = True
.ApplyStyleLastColumn = False
.ApplyStyleRowBands = True
.ApplyStyleColumnBands = False

End With

ActiveDocument.AttachedTemplate.BuildingBlockEntri es("StandardWorkflow").Insert _
Where:=Selection.Range, RichText:=True
Selection.Rows.Delete
Selection.TypeBackspace
Selection.Tables(1).AutoFitBehavior (wdAutoFitWindow)
End With
End Sub

Thank you!!
Reply With Quote
 

Tags
building block, table



Similar Threads
Thread Thread Starter Forum Replies Last Post
Trying to make a table of contents in a grid rodrigocarballo Word 1 11-11-2016 01:32 PM
Making a grid with diagonal lines extending outside of table stulutions Publisher 0 09-21-2016 10:15 AM
Problem with table grid when selecting status in ribbon Selecting table cell vs. text dionnaro Word Tables 1 05-24-2016 04:04 PM
Problem when selecting a style in the styles list patricebrel Word 2 01-09-2016 06:52 AM
Problem with table grid when selecting status in ribbon Problem with ribbon customization NobodysPerfect Word 3 11-10-2014 12:49 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:47 AM.


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