Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 11-10-2015, 02:52 PM
snufse snufse is offline Inserting a table using ADD command Windows 7 64bit Inserting a table using ADD command Office 2013
Novice
Inserting a table using ADD command
 
Join Date: Nov 2015
Posts: 1
snufse is on a distinguished road
Default Inserting a table using ADD command

I have a word template where I added a table to Quick Parts / Part Gallery. I also added a command button with code behind. Now when I click the ADD button it inserts a new table in the form and that is what I want. When it display the inserted table it also gives an error:



Table Error! No text of specified style in document.‑1 <Table Title>
Not sure what this is and how to correct. Thank you.

Code behind the ADD button:

Code:
Private Sub CommandButton1_Click()
With CaptionLabels("Table")
        .NumberStyle = wdCaptionNumberStyleArabic
        .IncludeChapterNumber = True
        .ChapterStyleLevel = 1
        .Separator = wdSeparatorHyphen
End With
    Selection.InsertCaption Label:="Table", TitleAutoText:="", Title:="", _
        Position:=wdCaptionPositionAbove, ExcludeLabel:=0
    Selection.TypeText Text:="   <Table Title>"
    Selection.TypeParagraph
    ActiveDocument.AttachedTemplate.BuildingBlockEntries("corporate_table" _
      ).Insert Where:=Selection.Range, RichText:=True
End Sub
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Inserting a table using ADD command Inserting Images/Pictures into Table of Content Simon Word 11 09-12-2016 11:37 PM
Inserting a table using ADD command Inserting arrow images into a table jklein Word Tables 5 06-29-2014 07:40 PM
Inserting a table using ADD command Inserting table natasha_arriell Mail Merge 4 06-04-2014 12:13 AM
Inserting a table using ADD command Inserting landscape Table into Portrait Document sstark Word Tables 2 02-13-2013 08:43 AM
Inserting a table Katelyn Outlook 0 04-05-2012 09:39 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:08 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