Hello,
I am currently using VB6 to automate word and generate a report. I use vb6 to open a report template that I have made, and then fill in the correct data (using bookmarks).
The problem I am having is that the document contains a chart that I need to modify, and I have no idea how to do it. Doing it from word is easy, just right click on the chart, goto "datasheet", and type in the correct values. Does anyone have any idea on how to do this from visual basic?
Some of my code is pasted below.
Any responses would be greatly appreciated. Thanks
Paul
Dim wordapp As Word.Application
Dim doc As Document
Set wordapp = CreateObject("Word.Application")
Set doc = wordapp.Documents.Add("Report_Test")
'this is how I enter my data
With wordapp
.ActiveDocument.Bookmarks("bmCustomer").Select
.Selection.TypeText (Customer)
End With
Thanks again!
I am currently using VB6 to automate word and generate a report. I use vb6 to open a report template that I have made, and then fill in the correct data (using bookmarks).
The problem I am having is that the document contains a chart that I need to modify, and I have no idea how to do it. Doing it from word is easy, just right click on the chart, goto "datasheet", and type in the correct values. Does anyone have any idea on how to do this from visual basic?
Some of my code is pasted below.
Any responses would be greatly appreciated. Thanks
Paul
Dim wordapp As Word.Application
Dim doc As Document
Set wordapp = CreateObject("Word.Application")
Set doc = wordapp.Documents.Add("Report_Test")
'this is how I enter my data
With wordapp
.ActiveDocument.Bookmarks("bmCustomer").Select
.Selection.TypeText (Customer)
End With
Thanks again!