Quantcast
Channel: NetOffice - MS Office in .NET
Viewing all 1741 articles
Browse latest View live

Released: NetOffice 1.7.3 (Feb 25, 2015)

$
0
0
Download 1: NetOffice Release 1.7.3

Includes:
- Binaries .NET : v2.0, v3.0, v3.5, v4.0, v4.5
- Tutorials/Examples in C#/VB.Net
- Source Code

Download 2: NetOffice Developer Toolbox
requires .NET 4(Client Profile)

Features:

- Project Wizard
- Office Compatibility
- Application Observer
- Registry Editor
- Addin Guard
- Outlook Security
- Office UI

Updated Release: NetOffice 1.7.3 (Feb 25, 2015)

$
0
0
Download 1: NetOffice Release 1.7.3

Includes:
- Binaries .NET : v2.0, v3.0, v3.5, v4.0, v4.5
- Tutorials/Examples in C#/VB.Net
- Source Code

Download 2: NetOffice Developer Toolbox
requires .NET 4(Client Profile)

Features:

- Project Wizard
- Office Compatibility
- Application Observer
- Registry Editor
- Addin Guard
- Outlook Security
- Office UI

Source code checked in, #114240

$
0
0
[Regular Commit] - improve PerformanceTrace to allow multiple criterias - update PerformanceTrace concept test - update assemblies

New Post: NetOffice Outlook Plugin Deployment - No Idea How

$
0
0
what you have to do is copy the assembly (incl. depencies) to the target system and register your assembly here as office addin.

the common ways:

1.) register your assembly at hand with the .net utiltity tool RegAsm.exe

2.) build an installer package and let the installer do the register process for you.
You find 2 example projects for .MSI deployment in the NetOffice download section.
[Example] MSI Deployment (C#)
[Example] MSI Deployment (VB)
You can also use Wix or something else to create a ready-to-go setup package. Just make sure to set the options
"Register for COM" (or something like this)

*Sebastian

New Post: NetOffice Outlook Plugin Deployment - No Idea How

Created Unassigned: SlideShowSettings.Run() freezes thread if presentation contains external media objects [21928]

$
0
0
Hi,

I'm using your library to control PowerPoint SlideShows, but I have problem with some presentations. If a presentation contains some extrenal media objects, my app stops executing on the SlideShowSettings.Run() method (if it's called from the main thread, app freezes totally and no exception is thrown). Execution is then stopped until user closes the Microsoft Office Security Options dialog (image attached). Setting ppApplication.DisplayAlerts to PpAlertLevel.ppAlertsNone; doesn't help. Is there any setting to disable these dialogs? Or how to correctly handle this problem?

Thanks

New Post: ILMerge Issues

$
0
0
Like some other posters, I am having trouble using NetOffice with ILMerge.

I use NetOffice with Excel, through both add-ins and stand-alone apps. My apps or add-ins will run fine before merging, but after merging I will get "Factory has not been initialized with NetOffice libraries" exceptions in different places. Some references to classes in ExcelApi.dll or the other NetOffice libraries will work fine, but some will not.

The current example that I'm stuck on is with the ExcelApi.Application.AddIns property. I can get a reference to an AddIn object with an expression like
AddIn a = app.AddIns.Add(filepath); 
but I cannot query the contents of an AddIns collection with an expression like
foreach (AddIn a in app.Addins) do stuff;
This will give me the "Factory not initialized" exception, but only if I've use ILMerge.

I've tried explicitly calling
NetOffice.Core.Default.Initialize();
but that does not change anything.

I've looked at the source code for the Core/Factory object and my guess is that it has to do with the factory loading assemblies by name. Is this correct? How can I get around this?

New Post: ILMerge Issues

$
0
0
*first what i have to say:

its first time for me to face an ILMerge problem(Like some other posters? realy???)

i need 1-2 day(s) to reproduce the problem because i have no experience with ILMerge - at all.

its a kind of magic. my current idea is ILMerge works in another AppDomain and the NetOffice enumerators are not ready to handle this for self-initializing. in other words: your Intialize() call is in your appdomain works well but ILMerge works in his own AppDomain and the first enumerator doesnt works because NetOffice miss the self-initializing check here. as possible hot fix and error trace for me: please try to call a foo[!] Application method or property before . (the methods and properties initialize the NetOffice.Core in his AppDomain but may the self-check is missing for enumerators possible bug)

(nice to know: did you use Office from multiple threads?)

*Sebastian

New Post: (DE) Problem mit PageSetup-Befehlen

$
0
0
Hey,

ich nutze die aktuelle Version von NetOffice und finde die echt Klasse!
Allerdings komme ich bei mir auf einen Fehler, wenn ich diesen Code nutzen möchte

obj_XLWks.PageSetup.FitToPagesWide = 1
obj_XLWks.PageSetup.FitToPagesTall = 0

Daraufhin bekam ich folgendes
ex.Exception.Message => ​See inner exception(s) for details.
ex.InnerException.Message => Ein Aufrufziel hat einen Ausnahmefehler verursacht.
StackTrace =>bei System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters)
bei System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
bei System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, CultureInfo culture)
bei NetOffice.Invoker.PropertySet(COMObject comObject, String name, Object[] value) in c:\Users\Sebastian\Desktop\Kopie von Source\NetOffice\Invoker.cs:Zeile 876

Ich weiß damit jetzt nichts anzufangen, ist der Befehl falsch oder ist das ein Bug in NetOffice

Ich bin Dankbar für jede Rückmeldung.

LG
Axel

New Post: (DE) Problem mit PageSetup-Befehlen

$
0
0
Für den Zugriff auf PageSetup muss ein Drucker eingerichtet sein und der Spooler Service laufen(was er per voreinstellung auch tut).
Das ist in Office leider so. Hat mit NetOffice an sich nix zu tun. Schau mal in die inner exception(s) ob da noch was genaueres drin steht.

*Sebastian

New Post: (DE) Problem mit PageSetup-Befehlen

$
0
0
Ohne den Teil funktioniert der Code bestens, nur bei diesem springt er raus.
See inner exception(s) for details.   

bei NetOffice.Invoker.PropertySet(COMObject comObject, String name, Object[] value) in c:\Users\Sebastian\Desktop\Kopie von Source\NetOffice\Invoker.cs:Zeile 881.
   bei NetOffice.ExcelApi.PageSetup.set_FitToPagesTall(Object value) in c:\Users\Sebastian\Desktop\Kopie von Source\Excel\DispatchInterfaces\PageSetup.cs:Zeile 481.
   bei SpediGonzales.mod_Drucken.sub_Druck_AVListe(String pustr_TourPrefix, String pustr_TourNr) in C:\Users\Axel\Documents\Visual Studio 2013\Projects\SpediGonzales\SpediGonzales\mod_Drucken.vb:Zeile 820.
Ein Aufrufziel hat einen Ausnahmefehler verursacht.

StackTrace>>   bei System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters)
   bei System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
   bei System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, CultureInfo culture)
   bei NetOffice.Invoker.PropertySet(COMObject comObject, String name, Object[] value) in c:\Users\Sebastian\Desktop\Kopie von Source\NetOffice\Invoker.cs:Zeile 876.

HResult>>-2146232828

Source>>mscorlib

Data>>System.Collections.ListDictionaryInternal
Habe ich etwas vergessen zu posten?

New Post: (DE) Problem mit PageSetup-Befehlen

New Post: NetOffice Outlook Plugin Deployment - No Idea How

$
0
0
At the hedge fund where I recently worked we deployed VSTO add-ins using ClickOnce.

That was no problem at all for users. We simply sent them a link to the deployment server and had them create a desktop shortcut for the ".application" file. (I liked that better than "setup.exe".)

I don't see any reason why that would not work equally well for NetOffice.

BTW: You can include any number of additional support assemblies in the "required files" on the ClickOnce property page.

If you prefer to avoid learning the details of ClickOnce, you can always try out something like Squirrel.Windows, which might arguably be simpler in many cases.

New Post: (DE) Problem mit PageSetup-Befehlen

$
0
0
Hey Sebastian,
besten Dank für den Tipp, aber das hatte ich schon in einem VB-Forum.

Ich habe den Code wie folgt geändert. Erste/Dritte Zeile habe ich auskommentiert.
        'obj_XLWks.PageSetup.Zoom = False
        obj_XLWks.PageSetup.FitToPagesWide = True
        'obj_XLWks.PageSetup.FitToPagesTall = 0
See inner exception(s) for details.   bei NetOffice.Invoker.PropertySet(COMObject comObject, String name, Object[] value) in c:\Users\Sebastian\Desktop\Kopie von Source\NetOffice\Invoker.cs:Zeile 881.
   bei NetOffice.ExcelApi.PageSetup.set_FitToPagesWide(Object value) in c:\Users\Sebastian\Desktop\Kopie von Source\Excel\DispatchInterfaces\PageSetup.cs:Zeile 510.
   bei SpediGonzales.mod_Drucken.sub_Druck_AVListe(String pustr_TourPrefix, String pustr_TourNr) in C:\Users\Axel\Documents\Visual Studio 2013\Projects\SpediGonzales\SpediGonzales\mod_Drucken.vb:Zeile 819.
Ein Aufrufziel hat einen Ausnahmefehler verursacht.
StackTrace>>   bei System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters)
   bei System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
   bei System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args, CultureInfo culture)
   bei NetOffice.Invoker.PropertySet(COMObject comObject, String name, Object[] value) in c:\Users\Sebastian\Desktop\Kopie von Source\NetOffice\Invoker.cs:Zeile 876.HResult>>-2146232828
Source>>mscorlib
Data>>System.Collections.ListDictionaryInternal

New Post: (DE) Problem mit PageSetup-Befehlen

$
0
0
Ich habe jetzt noch etwas drüber nachgedacht:
FitToPage kann unter keinen erdenklichen Umständen Boolean-Werte annehmen, denn ich kann in dieser Einstellung innerhalb Excel sagen, skaliere mir den Tabelleninhalt auf maximal n-Seiten breit. Da passt kein Wahr/Falsch.

Jedoch auch umgedreht hat Wahr/Falsch immer die Bedeutung 1/0, d.h. die Werte die ich dort eingegeben habe, sollten Boolean-Werte angenommen haben.

Also stimmt doch eher was an der Bibliothek nicht, als an dem Programm oder übersehe ich da etwas???

New Post: (DE) Problem mit PageSetup-Befehlen

$
0
0
Ich kann dir nicht wirklich folgen aber folgender Code funktioniert bei mir, so wie auch in dem verlinkten Topic auf Stackoverflow beschrieben:

workSheet.PageSetup.FitToPagesWide = 1;
workSheet.PageSetup.FitToPagesTall = false;

(Du hast allerdings irgendwie was anderes gemacht. Das Problem liegt/lag ja bei FitToPagesTall und nicht bei FitToPagesWide dem du irrtümlich einen boolean Wert zuweist.)

*Sebastian

New Post: (DE) Problem mit PageSetup-Befehlen

$
0
0
Warum steht in den Fehlermeldungen teilweise ein Pfad der eindeutig auf Alex seine Verzeichnisstruktur hinweist und andererseits aber auch Pfade, die auf Deine (Sebastian) persönliche Verzeichnisstruktur hinweisen?
Mich irritiert das sehr, mag aber nichts zu bedeuten haben....

New Post: (SOLVED) (DE) Problem mit PageSetup-Befehlen

$
0
0
Moin Moin,

das meine Verzeichnisstruktur auftaucht mag daran liegen, dass ich vorübergehend so viel wie möglich an Fehlermeldung einblende. Darum u.a. die Source des Fehlers => Zeile 819

-> Sebastian
Danke, der Code läuft ohne Fehler durch. Ich habe den Post so interpretiert, dass beide auf True/False gestellt werden müssten. Allerdings im Ergebnis macht er nicht das was er soll. Das lag aber daran, dass hier auch der Zoom deaktiviert werden muss.

Mein Code lautet wie folgt:
            obj_XLWks.PageSetup.Zoom = False
            obj_XLWks.PageSetup.FitToPagesWide = 1
            obj_XLWks.PageSetup.FitToPagesTall = False

New Post: (SOLVED) (DE) Problem mit PageSetup-Befehlen

$
0
0
Hallo,

Diese Pfade ("c:\Users\Sebastian\Desktop\Kopie von Source\NetOffice") stammen aus den mitgelieferten .pdb Dateien.

Für die die es nicht wissen:
.PDB sind Symbol Dateien für den Debugger, damit wird es möglich auch direkt in den Original NetOffice Code zu springen(sofern vorhanden), Haltepunkte zu setzen, überwachen, etc. Beim ersten mal fragt die IDE 1x nach wo der Code liegt und merkt sich diese Pfadangabe. (Bezieht man die PDB's über einen Symbolserver kann der Code auch von da ohne Nachfrage nachgeladen werden)

Gefällt mir auch nicht unbedingt das in der .pdb die Originalpfade einkodiert sind. Es gibt allerdings, zumindest in VS ein paar Einstellungsmöglichkeiten was in der PDB stehen soll. Ich hab mich damit aber noch nicht beschäftigt und alles in der Default Einstellung belassen.
Bei Gelegenheit gehe ich das Thema aber nochmal an.

*Sebastian

New Post: Word page number using NetOffice

$
0
0
Hello,

I am using NetOffice C# to read some word documents, and I search for specific words in these documents, it would help me to identify the page numbers where these words occurred.

I read the whole document as a string and split the string to words and put the words in an array.

I can't find a full documentation that could help me through this and I hope you do.

Thank you in advance.
Viewing all 1741 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>