Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
B

burrows stephen

@burrows stephen
About
Posts
7
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • WOrd Automation
    B burrows stephen

    thats something I'm looking at present myself main problem is making sure i only close down the new process any ides would be great thanks.

    C# help asp-net winforms com graphics

  • WOrd Automation
    B burrows stephen

    the problem is it checks for a process and will start one fine but if there is one running the application will start a second instance of Word up that is ties to the first

    C# help asp-net winforms com graphics

  • WOrd Automation
    B burrows stephen

    Hi I'm writing an app that will have some Word automation, but I can not be certain if the user has already got an instance of word open, if they do i wish to use there unstance do my automation or else start a new instance. My problem is if they have it open my code makes a new instance and will close down the both instance when i finish can any one help.

    using System;
    using System.Collections.Generic;
    using System.Drawing;
    using System.Windows.Forms;
    using Word=Microsoft.Office.Interop.Word;
    using System.Runtime.InteropServices;
    using core= Microsoft.Office.Core;
    using System.Diagnostics;
    namespace WordProcess
    {
    /// /// Description of MainForm.
    ///
    public partial class MainForm : Form
    {

    	Word.Application wordApp;
    	Word.\_Document wordDocument;
    	
    
    	object document;
    	object wordFalse = false;
    	object wordTrue = true;
    	object dynamic = 2;
    	
    	object wordMissing = System.Reflection.Missing.Value;
    	public MainForm()
    	{
    		//
    		// The InitializeComponent() call is required for Windows Forms designer support.
    		//
    		InitializeComponent();
    		
    		//
    		// TODO: Add constructor code after the InitializeComponent() call.
    		//
    	}
    	
    	void Button1Click(object sender, EventArgs e)
    	{
    		
    		System.Diagnostics.Process\[\] wordPro = System.Diagnostics.Process.GetProcessesByName("winword");
    		if (wordPro.Length==0){
    			//No word Open start a new word process.
    			Process p= Process.Start("WINWORD.EXE");
    			p.WaitForInputIdle();
    			
    			
    		}
    		try{
    			object filePath =@"C:\\test.doc";
    			object filePath1 =@"C:\\test1.doc";
    			wordDocument = new Word.DocumentClass();
    			
    			
    			wordApp = (Word.Application)Marshal.GetActiveObject("Word.Application");
    			
    			
    			wordApp.Documents.Open(ref filePath, ref wordMissing, ref wordFalse, ref wordMissing,
    			                       ref wordMissing, ref wordMissing, ref wordMissing, ref wordMissing,
    			                       ref wordMissing, ref wordMissing, ref wordMissing, ref wordTrue,
    			                       ref wordMissing, ref wordMissing, ref wordMissing, ref wordMissing);
    			
    			
    			
    			wordDocument.SaveAs(ref filePath1, ref wordMissing, ref wordFalse, ref wordMissing,
    			                    ref wordMissing, ref wordMissing, ref wordMissing, ref wordMissing,
    			                    ref wordMissing, ref wordMissing, ref wordMissing, ref wordTrue,
    			                    ref wordMissing, ref wordMissing, ref wordMissing, ref wordMissing);
    
    C# help asp-net winforms com graphics

  • Problems with Generic Collection class.
    B burrows stephen

    Thanks for the reply yes the AceCLient does Implement ICleint. I was hoping that class Class1 : Dictionary where T:IClient would mean the Dictionary Type would be of the Type of the instantiate calls so in my instanace the dictionary would be Dictionary : Dictionary where T:IClient It just means if i wish to access the collection by a class that implements ICLient i have to do the following casting ((AceClient)col[1]).Temp; where col is the collection and Temp is and exdened property of AceCLient Not found in IClient

    C# database

  • Problems with Generic Collection class.
    B burrows stephen

    Hi I’m working on a system that has 4 different types of client they have mostly the same attributes so I decided to create an interface IClient for them to implement and then just add the differing attributes as needed to each client class. Now I get the Client information from a DB and Load them into a Generic dictionary The class looks like so [code] class Class1 : Dictionary where T:IClient { private IndemnityScheme scheme; public Class1(IndemnityScheme scheme) { this.scheme = scheme; } public int Load() { // "procIndemnityClientSelect"; DataBaseAccess dba = new DataBaseAccess(this.scheme); SqlDataReader reader = dba.LoadData("procPrsymClientSelect"); SmartDataReader smartReader = new SmartDataReader(reader); while (smartReader.Read()) { AceClient newClient = new AceClient(this.scheme); newClient.Clientshort = smartReader.GetString("Client Short Name"); newClient.Clientname = smartReader.GetString("Client Name"); newClient.Clientref = smartReader.GetInt32("client ref"); newClient.AddressLine1 = smartReader.GetString("Address Line 1"); newClient.AddressLine2 = smartReader.GetString("Address Line 2"); newClient.AddressLine3 = smartReader.GetString("Address Line 3"); newClient.AddressLine4 = smartReader.GetString("Address Line 4"); newClient.AddressLine5 = smartReader.GetString("Address Line 5"); newClient.AddressLine6 = smartReader.GetString("Address Line 6"); newClient.Telephone = smartReader.GetString("Telephone No"); newClient.PostCode = smartReader.GetString("post code"); newClient.Contact = smartReader.GetString("Contact"); // newClient.Handler = smartReader.GetString("Handler"); newClient.Joindate = smartReader.GetString("Join Date"); newClient.Leavingdate = smartReader.GetString("leaving Date"); newClient.Salutation = smartReader.GetString("salutation"); newClient.Email = smartReader.GetString("Email"); newClient.Comments = smartReader.GetString("comments"); base.Add(newClient.Clientref, newClient); } smartReader.Close();

    C# database

  • ToolTab Gone Hay Wire
    B burrows stephen

    Thanks been playing about un-installing reinstalling VS2005 for the past day now the tool bar now seems to work but I still get the following in the output window upon loading The ReportDesignerPackage ({11B8C903-8FFD-4DFC-87CE-F6A82D77AF6B}) did not load because of previous errors. For assistance, contact the package vendor. To attempt to load this package again, type 'devenv /resetskippkgs' at the command prompt. The DataWarehouse VSIntegration layer ({4A0C6509-BF90-43DA-ABEE-0ABA3A8527F1}) did not load because of previous errors. For assistance, contact the package vendor. To attempt to load this package again, type 'devenv /resetskippkgs' at the command prompt.

    C# help tutorial lounge

  • ToolTab Gone Hay Wire
    B burrows stephen

    HI all turned on VS2005 this morning and had a shock. My Tool Bar has gone hay wire The General tab has renamed itself #13119 and my Report Item Tab has replaced all the reporting controls with text boxes when I chose for a reset all it does is add another text box in the tab. So I reinstalled/repaired VS2005 and the problem has not been fixed does any one know what i have done to mess my system up and more importantly how to rectify the problem. Many thanks:sigh:

    C# help tutorial lounge
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups