L
Liming
Hello,
I have a command button and it activates a web form, so far so good.
Now, inside the webform, I I try to retrieve some data from a
webservices by calling another method and add custom propreties to the
current doucment. This is when hell break loose. Every click, it opens
up the webform in a NEW word document instead of the current document.
Here is my code
private void ConnectToIFB(object application)
{
Word._Document oDoc;
object oDocCustomProps;
object oMissing = System.Reflection.Missing.Value;
// Retreive custom properties from web services
......
//Add a property/value pair to the CustomDocumentProperties
collection.
oDoc = this.wordApp.Documents.Add(ref oMissing, ref oMissing,
ref oMissing,
ref oMissing);
oDocCustomProps = oDoc.CustomDocumentProperties;
Type typeDocCustomProps = oDocCustomProps.GetType();
.....
// attach custom properties
}
Is it the problem with the "this.wordApp.Documents.Add"?
I have a command button and it activates a web form, so far so good.
Now, inside the webform, I I try to retrieve some data from a
webservices by calling another method and add custom propreties to the
current doucment. This is when hell break loose. Every click, it opens
up the webform in a NEW word document instead of the current document.
Here is my code
private void ConnectToIFB(object application)
{
Word._Document oDoc;
object oDocCustomProps;
object oMissing = System.Reflection.Missing.Value;
// Retreive custom properties from web services
......
//Add a property/value pair to the CustomDocumentProperties
collection.
oDoc = this.wordApp.Documents.Add(ref oMissing, ref oMissing,
ref oMissing,
ref oMissing);
oDocCustomProps = oDoc.CustomDocumentProperties;
Type typeDocCustomProps = oDocCustomProps.GetType();
.....
// attach custom properties
}
Is it the problem with the "this.wordApp.Documents.Add"?