Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
FDscend authored Jun 19, 2023
1 parent 792e1e0 commit d896c8e
Show file tree
Hide file tree
Showing 5 changed files with 591 additions and 42 deletions.
77 changes: 77 additions & 0 deletions PatternSelectForm.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 34 additions & 0 deletions PatternSelectForm.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Word = Microsoft.Office.Interop.Word;

namespace WordAddIn1
{
public partial class PatternSelectForm : Form
{
public string selectedName = "";

public PatternSelectForm(Word.Documents doc)
{
InitializeComponent();

for (int i = 1; i < Globals.ThisAddIn.Application.ActiveDocument.Styles.Count; i++)
{
comboBox1.Items.Add(Globals.ThisAddIn.Application.ActiveDocument.Styles[i].NameLocal);
}
comboBox1.Text = comboBox1.Items[0].ToString();
}

private void button1_Click(object sender, EventArgs e)
{
selectedName = comboBox1.SelectedItem.ToString();
this.Close();
}
}
}
Loading

0 comments on commit d896c8e

Please sign in to comment.