Help for a beginner - creating rows,columns and formatting name

danboi10

Registered User.
Local time
Today, 02:59
Joined
Aug 15, 2012
Messages
19
Hi,

I am currently working on an automated letter and have in the most completed the automation. I have only two more issues to resolve and it can go live - I've searched the web and got no joy. :banghead:

It's a two parter! The first query relates to inserting a table and fields. I'd like my letter to automate a table; so 1 row and 5 columns, with the rows and columns adjusting to fit the information contained in each field. I've tried
Code:
WrdApp.Selection.Tables.Add Range:=Selection.Range, NumRows:=1, NumColumns:= 5
but no joy.

The second query is i'd like the automated letter to just return the first name from the ManagersName field (this field is the full name). I've managed to
Code:
WrdApp.Selection.TypeText Text:=StrConv([MANAGERS NAME], vbProperCase)
. To select the field and format the text but I just want the to return the first name. For reasons that baffle me the Managers Name Field must remain the full name!

Any help for a beginner would be appreciated.

Dan.
 
This is an Access forum so you may not get answers to specific Word questions.

You may have more luck by Googling
microsoft word vba sample code
http://bit.ly/ROgXpa
 
I probably should have mentioned that the automated letter is being generated using access 07 vba.

Sorry.
 
Thanks Pat.

Will chase up after me return from leave.

Dan.
 

Users who are viewing this thread

Back
Top Bottom