|
Thanks. That took care of it.
Gaulles
|
|
|
|
|
I need to find a C#/.NET implementation of a PushBackInputStream or a simple solution as to how I can use an exisiting C# stream to do the same thing.
Thanks...
Coding is a way of life. It's in the air we breath. It pumps through our veines. Without it we soon crumble to dust. - Rodney S. Foley
|
|
|
|
|
Hi,
Splitter control is great feature added to .Net.I want to create explorer like user interface, but in left pan I have tree control, based on node selection here I want to display different form on right pan.(If any of you remember COM Viewer).Any ideas on how can this be done.
Thanks.
|
|
|
|
|
Well my illustrious leader AKA the boss man, has set me the task of creating an C# application that will print mail merged word documents (merged with data from the C# application), so far I have come up with the following (there is a but, see after the code) :
<br />
private void PrintBookMarkedDoc()<br />
{<br />
object oMissing = System.Reflection.Missing.Value;<br />
object fileName = Environment.CurrentDirectory + @"\dev_template.dot";<br />
object newTemplate = false;<br />
object docType = 0;<br />
object isVisible = true;<br />
<br />
Word.Document ActiveDoc = WordApp.Documents.Add(ref fileName, ref newTemplate, ref docType, ref isVisible);<br />
WordApp.Visible = false;<br />
ActiveDoc.Activate();<br />
<br />
object oWhat = Word.WdGoToItem.wdGoToBookmark;<br />
<br />
object oName = "name";<br />
ActiveDoc.GoTo(ref oWhat, ref oMissing, ref oMissing, ref oName).Text = txtName.Text;<br />
<br />
oName = "val1";<br />
ActiveDoc.GoTo(ref oWhat, ref oMissing, ref oMissing, ref oName).Text = txtValue1.Text;<br />
<br />
oName = "val2";<br />
ActiveDoc.GoTo(ref oWhat, ref oMissing, ref oMissing, ref oName).Text = txtValue2.Text;<br />
<br />
object xcopies = 1;<br />
ActiveDoc.PrintOut(ref oMissing,ref oMissing,ref oMissing,ref oMissing,ref<br />
oMissing,ref oMissing,ref oMissing,ref xcopies,ref oMissing,ref oMissing,ref<br />
oMissing,ref oMissing,ref oMissing,ref oMissing,ref oMissing,ref<br />
oMissing,ref oMissing,ref oMissing);<br />
<br />
object oSaveChanges = 0;<br />
}<br />
Now this works, and diligently takes values and pumps them into the word document template at a specified bookmark - but yes your right, this isnt really mail merging - as it uses bookmarks and not Word FILL-IN mail merge fields, which presents problems when document templates change etc etc, so I really need proper mailmerging - i.e find all FILL fields in XYZ templates and put VALUE123 in there
Has anybody done anything similar using mailmerge fields, and if so, how on earth do you do it?
p.s. I have tried messing around with Word.WdGoToItem.wdGoToField & Word.WdGoToDirection.wdGoToNext to no avail
Thanks muchly in Advance
Mr Eyes
EDIT :
There is a sample on the MS website, but its a no go, as it doesnt even compile
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q301659
|
|
|
|
|
I usually approach this by recording a macro, doing the operation, and then translating it to C#.
|
|
|
|
|
I have used Mail Merging heavily in a prior project at law firm whose only business was to produce documents (or so it seemed). Word provides an object, appropriately named MailMerge, to provide merging automation - I assume you can use that in C# through Interop, couldn't imagine why you couldn't. I would recommend using a table in an Access file as your DataSource instead. As Eric said, record a macro in VBA and then clean it up for your own use.
HTH
Mike
|
|
|
|
|
I want a edit control ,that can vertically input text.
how can help me, like in html(writing-mode).it use to
input mongol word.my name is jirigala, i am from China,
my email: jirigala@mengguren.com,
my home page www.mengguren.com
|
|
|
|
|
Hi All
We are developing a new project in C# and it is being migrated from VB6 which uses client server technology with SQL server 2k.
I am developing a DLL which gives data a part of the VB6 application to the new new c# project developed (bridge kind of stuff that links these two application which retrieves data from SQL server and give it to vb6 dll)
I wanted to know what is the best method of giving back the results (in the form of recordsets/xml or whatever) from the dll to c# program
Kindly help
Thanks
Siva
|
|
|
|
|
XML, because a dataset can import it.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
|
I’m new in all this, but tell me – I develop an application in C# - is it possible to run this application under
Windows 98 or Millenium? What shall I do or where can I read about this?
Thanks!
|
|
|
|
|
Yes, so long as it has the .NET framework installed. You can only develop under an NT based OS though, that means W2000 or XP.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
Christian Graus wrote:
so long as it has the .NET framework installed
Christian, I don't want to be bothersome, but do they really need the whole .NET Framework?
Don't they only need the .NET redistributable files (20mb)in able to run C# apps?
This has been discussed many times before, but. Because he was newbie I wanted to say this. Hope you understand my point, Christian.
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
Also I've read that you *can* develop on win98 with C# because the redistibuteable comes with the C# compiler. Allthough I've never used it like this...
|
|
|
|
|
djkno3 wrote:
you *can* develop on win98 with C# because the redistibuteable comes with the C# compiler
Which compiler?
If you mean csc you can use it on Win98, but the Visual Studio .NET is only a NT capable IDE as Christian said.
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
Rickard Andersson wrote:
Which compiler?
If you mean csc you can use it on Win98, but the Visual Studio .NET is only a NT capable IDE as Christian said.
actually yes that is the the compiler but I fail to see where he said anything about Visual Studio .NET
as far as I know http://www.icsharpcode.net/OpenSource/SD/default.asp[^]should run on win98...
|
|
|
|
|
That is an IDE. Not a compiler. I don't think there is more than the csc compiler for C#....
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
Rickard Andersson wrote:
Christian, I don't want to be bothersome, but do they really need the whole .NET Framework?
Don't they only need the .NET redistributable files (20mb)in able to run C# apps?
That is exactly what I meant.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
Anyone tell me about creating simple connection to Access database in c# using datagrid, and textboxes. .:confused
|
|
|
|
|
Abu Atwan wrote:
Anyone tell me about creating simple connection to Access database in c# using datagrid, and textboxes.
Sure here is a quick example:
string sql;
sql = GetSearchString();<font color=green>
try
{
string myConnString = "Provider=Microsoft.Jet.OLEDB.4.0;"
+ "Data Source=" + @"C:\Documents and Settings\User\Desktop\phonebook\phonebook.mdb";
OleDbConnection myConnection = new OleDbConnection(myConnString);
myConnection.Open();
OleDbCommand myCommand = new OleDbCommand();
myCommand.Connection = myConnection;
myCommand.CommandText = sql;
OleDbDataAdapter myDataAdapter = new OleDbDataAdapter(myCommand);
DataSet myDataSet = new DataSet();
myDataAdapter.Fill(myDataSet);
this.dataGrid1.DataSource = myDataSet;
this.dataGrid1.Visible = true;
myConnection.Close();
}
catch(Exception err)
{
MessageBox.Show("An error has occured\n\n" + err.Message + "\n" + err.Source + "\n", "Phone Book Error");
}
Hope this helps.
Nick Parker
Not everything that can be counted counts, and not everything that counts can be counted. - Albert Einstein
|
|
|
|
|
Can anybody please help on a problem I am having?
My problem is that I need to be able to get the name of the application that my AddIn has been loaded into (Word, Excel etc.). I assume I use the application object that gets passed into the OnConnection method, but I am unsure how to get the reference to the "Name" property.
Does anybody have any samples or references that might help me in my endeavours?
Have a look at my website: http://www.chrisormerod.cjb.net
|
|
|
|
|
Chris Ormerod wrote:
Does anybody have any samples or references that might help me in my endeav
Hi Chris,
There are lot of references / articles on msdn on how to go about writing addins using managed code.
For starting take a look at this
Creating Office Managed COM Add-Ins with Visual Studio .NET[^]
Also have a look at this [^]
article, which might help you with your specific problem.
Hope this helps.
Cheers
Kannan
|
|
|
|
|
Is it possible to have text on the tray icon (notifyicon)? Want to do one of those %cpu usage tickers...
|
|
|
|
|
Do you mean a tooltip or actual text in the systray?
I don't know whether it's just the light but I swear the database server gives me dirty looks everytime I wander past.
-Chris Maunder
Microsoft has reinvented the wheel, this time they made it round.
-Peterchen on VS.NET
|
|
|
|
|
|