Find Jobs
Hire Freelancers

Convert C# to Class Library to read Office Doc Properties

£20-250 GBP

In Bearbeitung
Veröffentlicht vor etwa 13 Jahren

£20-250 GBP

Bezahlt bei Lieferung
Need to read the Office Document Properties from Word, Excel and Powerpoint. Can use the MS code from [login to view URL] which works fine as below (I modified it to use an existing doc rather than creating a new one). However, I'd like it to compile it into a DLL so it can be called by ASP.NET or WinForms in both C# and VB.NET (VS2010). So you need to implement this as a class library and sort out the interface references. I beleive this is possible but I don't have the experience or time to fiddle with that right now - I get the old "oDoc is a field but is used like a type" errors on an initial standalone class. You probably know better! Task: Convert it to a (still C#) Class Library so I can reference the compiled DLL in another project and query for the Author, Title and Manager of a standard office doc (provided as an input filepath string). Code to adjust: using [login to view URL]; using Word = [login to view URL]; using [login to view URL]; namespace FilePropertyChecker { public partial class FormMSApp : Form { public FormMSApp() { InitializeComponent(); } private void btnGo_Click(object sender, EventArgs e) { [login to view URL] oApp; Word._Document oDoc; //object oMissing = [login to view URL]; object oDocBuiltInProps; //object oDocCustomProps; //OPEN EXISTING DOC... oApp = new [login to view URL](); oDoc = [login to view URL](@"C:\Docs\[login to view URL]", ReadOnly: false, Visible: false); //[login to view URL](); ////Create an instance of Microsoft Word and make it visible. //oWord = new [login to view URL](); //[login to view URL] = true; ////Create a new Document and get the BuiltInDocumentProperties collection. //oDoc = [login to view URL](ref oMissing, ref oMissing, ref oMissing, // ref oMissing); oDocBuiltInProps = [login to view URL]; Type typeDocBuiltInProps = [login to view URL](); //Get the Author property and display it. string strIndex = "Author"; string strValue; object oDocAuthorProp = [login to view URL]("Item", [login to view URL] | [login to view URL], null, oDocBuiltInProps, new object[] { strIndex }); Type typeDocAuthorProp = [login to view URL](); strValue = [login to view URL]("Value", [login to view URL] | [login to view URL], null, oDocAuthorProp, new object[] { }).ToString(); [login to view URL]("The Author is: " + strValue, "Author"); //close objects... [login to view URL](); } } } Let me know if it's possible, should only take an hour or two if so - will include this code working in WinForms proj attached to help, see what you think. Thanks, Phil
Projekt-ID: 1016014

Über das Projekt

5 Vorschläge
Remote Projekt
Aktiv vor 13 Jahren

Möchten Sie etwas Geld verdienen?

Vorteile einer Ausschreibung auf Freelancer

Legen Sie Ihr Budget und Ihren Zeitrahmen fest
Für Ihre Arbeit bezahlt werden
Skizzieren Sie Ihren Vorschlag
Sie können sich kostenlos anmelden und auf Aufträge bieten
Vergeben an:
Avatar des Nutzers
please check your pmb.
£30 GBP in 0 Tag
5,0 (24 Bewertungen)
5,0
5,0
5 Freelancer bieten im Durchschnitt £45 GBP für diesen Auftrag
Avatar des Nutzers
Lets start it.
£45 GBP in 2 Tagen
5,0 (45 Bewertungen)
5,1
5,1
Avatar des Nutzers
please check your PMB
£50 GBP in 1 Tag
4,9 (10 Bewertungen)
3,7
3,7
Avatar des Nutzers
Hi, please see PMB
£49 GBP in 3 Tagen
5,0 (2 Bewertungen)
2,4
2,4

Über den Kunden

Flagge von UNITED KINGDOM
London, United Kingdom
5,0
2
Mitglied seit Mai 16, 2008

Kundenüberprüfung

Danke! Wir haben Ihnen per E-Mail einen Link geschickt, über den Sie Ihr kostenloses Guthaben anfordern können.
Beim Senden Ihrer E-Mail ist ein Fehler aufgetreten. Bitte versuchen Sie es erneut.
Registrierte Benutzer Veröffentlichte Jobs
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Vorschau wird geladen
Erlaubnis zur Geolokalisierung erteilt.
Ihre Anmeldesitzung ist abgelaufen und Sie wurden abgemeldet. Bitte melden Sie sich erneut an.