G
GDD
Hi,
I have got a problem to program a simple button that enables user to add a
Works file in his document.
In Word 2007, when I do "Insert>Object> Microsoft Works", I have a Works
document which is inserted.
However, when I try to do it programmatically in C# :
selection.InlineShapes.AddOLEObject(ref oClassType, ref pathToFile, ref
lienAvecFichier, ref oFalse, ref oIconFileName, ref oMissing, ref oIconLabel,
ref oMissing);
If the file exists, it works perfectly.
The trouble begin when I want to create a new object with these code lines :
Object oClassType = "Works.Worksheet.6";
selection.InlineShapes.AddOLEObject(ref oClassType, ref missing, ref
missing, ref missing, ref missing, ref missing, ref missing, ref missing);
When I attempt to insert a new Works object, it tells me that Works is not
installed. I tried various version of Works.Worksheet.x x from 1 to 8 without
success.
A solution ?
Thank you in advance,
GDD
I have got a problem to program a simple button that enables user to add a
Works file in his document.
In Word 2007, when I do "Insert>Object> Microsoft Works", I have a Works
document which is inserted.
However, when I try to do it programmatically in C# :
selection.InlineShapes.AddOLEObject(ref oClassType, ref pathToFile, ref
lienAvecFichier, ref oFalse, ref oIconFileName, ref oMissing, ref oIconLabel,
ref oMissing);
If the file exists, it works perfectly.
The trouble begin when I want to create a new object with these code lines :
Object oClassType = "Works.Worksheet.6";
selection.InlineShapes.AddOLEObject(ref oClassType, ref missing, ref
missing, ref missing, ref missing, ref missing, ref missing, ref missing);
When I attempt to insert a new Works object, it tells me that Works is not
installed. I tried various version of Works.Worksheet.x x from 1 to 8 without
success.
A solution ?
Thank you in advance,
GDD