![]() |
|
#5
|
|||
|
|||
|
Hello
I tried as per your guidance but what happens when Quote:
Quote:
i tried the above without the below comments in Marked RED but added with syntax marked in Blue Code:
Dim txtword As String
Dim objDoc As Document
Dim objRange As Range
Dim objTable As Table
Dim intRows As Integer
Dim intCols As Integer
txtword = "fsdhfkhfkdhfdskfhd fkdshfdkfhdskfhdsfd fdshgfdjdsjfg" & vbCr
Set objDoc = Documents.Add(Template:="C:\WordTrial\cmdBtnWord.docm")
With objDoc
.Range.Text = txtword
.Range.Font.Name = "Tahoma"
.Range.Font.Size = "12"
.Paragraphs.SpaceAfter = 0
End With
Set objRange = objDoc.Range
objRange.Collapse Direction:=wdCollapseStart
objRange.Text = txtword
objRange.Collapse Direction:=wdCollapseEnd
intRows = 8: intCols = 5
Set objTable = objDoc.Tables.Add(objRange, intRows, intCols)
objTable.Borders.Enable = True
Quote:
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| using styles to generate content page | TYPO | Word | 2 | 12-20-2015 12:48 PM |
Insert the page before table of content without altering it
|
kbhalakiya | Word | 2 | 08-29-2012 03:53 AM |
Rotate Page and Content Within It.
|
walker140 | Word | 1 | 11-13-2011 11:08 PM |
Page number in table of Content
|
Ritu | Office | 1 | 09-19-2011 05:10 AM |
Paragraph Disappears when Tabbing it over
|
GWalkaa | Word | 11 | 07-22-2011 03:19 AM |