コード例 #1
0
 private void AbroWordConErrores(Dictionary<string, List<string>> listaErrores)
 {
     try
     {
         Prueba_2 p = new Prueba_2(listaErrores);
         p.Show();
     }
     catch (Exception ex)
     {
         MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
     }
 }
コード例 #2
0
        private void AbroWordConErrores(Dictionary<string, List<string>> listaErrores)
        {
            Prueba_2 p = new Prueba_2(listaErrores);
            p.Show();

            //Dictionary<string, List<string>>.Enumerator iter = listaErrores.GetEnumerator();

            //object missing = null;

            //Word._Application oWord;
            //oWord = new Word.ApplicationClass();
            //Word._Document oDoc;
            //oDoc = new Word.DocumentClass();

            //oWord.Visible = true;

            //// Acá Try
            //try
            //{

            //    oDoc = oWord.Documents.Add(ref missing, ref missing, ref missing, ref missing);

            //    object ini = 0;
            //    object fin = 40;
            //    Word.Range rng;

            //    iter.MoveNext();

            //    rng = oDoc.Range(ref ini, ref fin);
            //    rng.Text = iter.Current.Key.ToString();

            //    ini = (int)ini + 40;
            //    fin = (int)fin + 40;

            //    rng = oDoc.Range(ref ini, ref fin);
            //    rng.Text = iter.Current.Value[0].ToString();
            //}
            //catch (Exception ex)
            //{

            //    throw ex;
            //}
        }