P
paul
Hi to all!
I have an issue that has been bugging me for quite some time and I hope that
someone might be able to point me into the right direction here.
The story is – I am writing an application that would allow a user to create
a Word output from pre-defined data tables. The output can contain both
charts and tables. While generating the output, Word or MSGraph cannot be
visible to the user. What I have is something like this
Here is what happens – first time we run this – everything is good, second
time, Word document becomes visible as well as the MSGraph window appears.
It happens when we hit the line with oShape = …….
I am wondering if someone knows the way to hide that Word document and that
MSGraph window.
Thanks in advance.
I have an issue that has been bugging me for quite some time and I hope that
someone might be able to point me into the right direction here.
The story is – I am writing an application that would allow a user to create
a Word output from pre-defined data tables. The output can contain both
charts and tables. While generating the output, Word or MSGraph cannot be
visible to the user. What I have is something like this
Code:
private sub AddChart(params)
Dim oShape As Word.InlineShape
Dim oChart As Object
oShape =
_wordDocument.Bookmarks.Item("\endofdoc").Range.InlineShapes.AddOLEObject(ClassType:="MSGraph.Chart.8",
FileName:="", LinkToFile:=False, DisplayAsIcon:=False)
oChart = oShape.OLEFormat.Object
If (chartOptions.UpdateDataSheet(oChart) <> True) Then
CLogger.Log("Chart has no data present. Check to make sure you
are not hidding the entire chart", CLogger.EntryType.Warning)
End If
CLogger.LogIf("Updating Chart Options")
chartOptions.UpdateChart(oChart)
oChart.Application.Update()
oChart.Application.Quit()
AddSection()
End sub
Here is what happens – first time we run this – everything is good, second
time, Word document becomes visible as well as the MSGraph window appears.
It happens when we hit the line with oShape = …….
I am wondering if someone knows the way to hide that Word document and that
MSGraph window.
Thanks in advance.