C# Programming
11-05-2009, 04:52 AM
Hai.....im anu..
can u ppl help me plzz.......im doing..Merge Word documents into one file...i wrote code lik below...i create a place (D:/destination/new.doc)..wher my documents ill open....in debugging whn i clik on merge button no files showing in "D:/destination/new.doc"....
im a fresher 4r dotnet .... hope u ll understnd my lang....
Thanqu .... http://www.barakasoft.com/script/Forums/Images/smiley_smile.gif
namespace DocMerger
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
List files=new List();
DialogResult dr = new DialogResult();
dr = openFile.ShowDialog();
if (dr == DialogResult.OK)
{
listView1.Items.Clear();
files.AddRange(openFile.FileNames.ToList());
foreach (string file in files)
{
listView1.Items.Add(Path.GetFileName(file));
}
}
}
private void button2_Click(object sender, EventArgs e)
{
DocMerger db=new DocMerger();
string path="D:/source/";
string output="D:/destination/new.doc";
string temp="D:/destination/temp.doc";
db.CopyMerge(temp,path,output);
}
}
}
can u ppl help me plzz.......im doing..Merge Word documents into one file...i wrote code lik below...i create a place (D:/destination/new.doc)..wher my documents ill open....in debugging whn i clik on merge button no files showing in "D:/destination/new.doc"....
im a fresher 4r dotnet .... hope u ll understnd my lang....
Thanqu .... http://www.barakasoft.com/script/Forums/Images/smiley_smile.gif
namespace DocMerger
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
List files=new List();
DialogResult dr = new DialogResult();
dr = openFile.ShowDialog();
if (dr == DialogResult.OK)
{
listView1.Items.Clear();
files.AddRange(openFile.FileNames.ToList());
foreach (string file in files)
{
listView1.Items.Add(Path.GetFileName(file));
}
}
}
private void button2_Click(object sender, EventArgs e)
{
DocMerger db=new DocMerger();
string path="D:/source/";
string output="D:/destination/new.doc";
string temp="D:/destination/temp.doc";
db.CopyMerge(temp,path,output);
}
}
}