TheShaunMichael
Board Regular
- Joined
- Oct 24, 2009
- Messages
- 57
Hi All,
Am working on some vba to essentially create a Word document. I've gotten fairly proficient with VBA in the confines of MS Excel and know little to nothing about how to make it work inside of a word document.
I've managed to get a new document to open and text on the page. The following is an excerpt of the code.
With wrdDoc
.Content.InsertAfter "Schedule of Services"
.Content.InsertParagraphAfter
.Content.InsertParagraphAfter
.Content.InsertAfter "Blah Blah Blah"
.Content.InsertParagraphAfter
.Content.InsertParagraphAfter
.Content.InsertAfter "Blah Blah blah"
.Content.Style = "No Spacing"
.Content.Font.Name = "HelveticaNeue Light"
End With
This creates the following:
Schedule of Services
Blah Blah Blah
Blah Blah Blah
(in the font HelveticaNeue Light)
My question is how do i bold and make larger the first line "Schedule of services" - or how to I control the font for a specific paragraph?
Secondly, is the code i'm using the best way to get this outcome?
Third, how would I go about setting up a basic 3 row x 5 column table with specific items in each cell.
Thank you all!
Am working on some vba to essentially create a Word document. I've gotten fairly proficient with VBA in the confines of MS Excel and know little to nothing about how to make it work inside of a word document.
I've managed to get a new document to open and text on the page. The following is an excerpt of the code.
With wrdDoc
.Content.InsertAfter "Schedule of Services"
.Content.InsertParagraphAfter
.Content.InsertParagraphAfter
.Content.InsertAfter "Blah Blah Blah"
.Content.InsertParagraphAfter
.Content.InsertParagraphAfter
.Content.InsertAfter "Blah Blah blah"
.Content.Style = "No Spacing"
.Content.Font.Name = "HelveticaNeue Light"
End With
This creates the following:
Schedule of Services
Blah Blah Blah
Blah Blah Blah
(in the font HelveticaNeue Light)
My question is how do i bold and make larger the first line "Schedule of services" - or how to I control the font for a specific paragraph?
Secondly, is the code i'm using the best way to get this outcome?
Third, how would I go about setting up a basic 3 row x 5 column table with specific items in each cell.
Thank you all!