1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
| COleVariant m_True((short)TRUE), m_False((short)FALSE), m_Long((long)DISP_E_PARAMNOTFOUND, VT_ERROR);
long l;
long j;
long k = ((Sections)m_WordDocument.GetSections()).GetCount();
for (long i = 1; i <= k; i++)
{
l = ((HeadersFooters)((Section)((Sections)m_WordDocument.GetSections()).Item(i)).GetHeaders()).GetCount();
for(j = 1; j <= l; j++)
{
MAJChamps(((Fields)((Range)((HeaderFooter)((HeadersFooters)((Section)((Sections)m_WordDocument.GetSections()).Item(i)).GetHeaders()).Item(i)).GetRange()).GetFields()));
}
l = 0;
l = ((HeadersFooters)((Section)((Sections)m_WordDocument.GetSections()).Item(i)).GetFooters()).GetCount();
for(j = 1; j <= l; j++)
{
MAJChamps(((Fields)((Range)((HeaderFooter)((HeadersFooters)((Section)((Sections)m_WordDocument.GetSections()).Item(i)).GetFooters()).Item(i)).GetRange()).GetFields()));
}
}
l = 0;
l = ((Fields)m_WordDocument.GetFields()).GetCount();
for(j = 1; j <= l; j++)
{
MAJChamps((Fields)m_WordDocument.GetFields());
}
m_WordDocument.SaveAs(COleVariant("C:\\Documents and Settings\\ppi\\Bureau\\Automation\\result.doc"),m_Long,m_False, COleVariant(""), m_True,COleVariant(""), m_False,m_False,m_False,m_False,m_False); |
Partager