|
Word: Documents.Add and Arrays: msg#00023windows.devel.jawin
Hi, sorry if this question is a faq, but i'm in trouble with invoking the Function Word.Documents.Add. That function takes four arguments, all of them optional and all of them of Type Variant[]. How do i set these arguments (important for me is only the first one, taking the document template)? _Document oDocument; Documents docs = app.getDocuments(); Variant[] varVorlage = new Variant[1]; varVorlage[1] = new Variant(); varVorlage[1].vt = VarTypes.VT_BSTR; varVorlage[1].bstrVal = VORBLVORL; Variant[] varTempl = new Variant[1]; varTempl[0] = new Variant(); varTempl[0].vt = VarTypes.VT_BOOL; varTempl[0].boolVal = false; Variant[] varTyp = new Variant[1]; varTyp[0] = new Variant(); varTyp[0].vt = VarTypes.VT_INT; varTyp[0].intVal = WdNewDocumentType.wdNewBlankDocument; Variant[] varTempl2 = new Variant[1]; varTempl2[0] = new Variant(); varTempl2[0].vt = VarTypes.VT_BOOL; varTempl2[0].boolVal = true; oDocument = docs.Add(varVorlage, varTempl, varTyp , varTempl2); leads to a COMException:Unable to serialize variant. Any hints or any working example? Thank you Florian |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: generated stubs fail to compile: 00023, Florian Schmitt |
|---|---|
| Next by Date: | Re: Word: Documents.Add and Arrays: 00023, Florian Schmitt |
| Previous by Thread: | Trying to Bride OPC Interfacesi: 00023, Pere Sanchez |
| Next by Thread: | Re: Word: Documents.Add and Arrays: 00023, Florian Schmitt |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |