How to Create a MsWord TOC without automation? - reporting-services

I'm using Aspose.Words to construct a Word Document programmatically (C#) on a server. The dynamically generated documents can be imported by clients via a web interface. Everything is great except I'm unable to generate a TOC. I've already exhausted my options with Aspose. Updating TOC fields is simply not a feature that Aspose currently supports. So... I'm open to any other viable solution even if it involves other third-party components. Automation has been ruled out because the Word Document is constructed on the server-side and Microsoft does not recommend using Automation on servers.
Can anyone suggest a solution? The optimal solution would be simply to be able to programmatically do a TOC Field Update. The solution cannot require installation of Word on the server. Are there any server-side reporting components that support this feature?
If a simple TOC Field Update solution is not available, then the next best thing would probably be the ability to programmatically construct a TOC by inspecting the Word document and extracting page numbers.
All ideas and input are welcome. I need a solution very soon.
Thanks,
Ed

Check this
http://www.aspose.com/documentation/.net-components/aspose.words-for-.net-and-java/aspose.words.documentbuilder.inserttableofcontents.html
BUt i can't find a way to generate it automatically without using F9 key in MS Word...

Related

How do I open a directory using Html when the files and html are all on a DVD

I work for a large company with agents all over the U.S. We want to upgrade our agents to Open Source office suite (Apache Open Office) from the chaotic mismatch of different versions used now. Problem is many of our people are barely computer literate.
I need to build a menu in Html to install the proper version on their systems from a DVD I have downloaded the files onto.
I can code some Html and some java but not a lot. It would help if it were cross browser since some use Macs but most use PCs.
I have researched for days and find many references to no access from the Web bit surely there is a way to do it offline?
Thanks in Advance.
I'm not sure that HTML is really what you want here. HTML is used to create web pages, but it's not a programming language and is not well suited to executing commands or performing tasks. JavaScript is the most common programming language used in web browsers, but you will have problems accessing a user's local file system for security reasons.
The best option I can think of is to give the installers appropriate names based on OS, and include documentation that clearly explains to users what they need to do. HTML may or may not be suitable for the documentation depending on your needs.
I want to thank everyone for their help.
Do to time restraints I believe the fastest solution is to do a simple text document in several forms describing the file choices and links to the files.
This way may not be eloquent but it is efficient.
Thanks for your time.

XSLT from the web - Needing the right dev/test environment

Mostly for learning and testing-purposes, I need an environment/software where I can apply XSL Transformations on websites (html).
It needs to support Sessions and Cookies because of a login required to actually reach the pages I want to transform via XSL.
The manual method aka calling the page in the browser and download it and copy into Eclipse for example, is too slow. I need an automated system.. if possible one which can call multiple pages via a script.
I know that this could be realized with a lot of coding in Java, but I hoped for a simpler solution...
Any ideas?
Thanks in advance!
No clue why people have downed this question -_-', but I've found a sufficing solution:
Using "wget" for downloading the files and Saxon HE (NET) for actually applying the transformations. Those programs can be easily called from windows CMD :)

Running a Perl/TK GUI inside a web page

We have a Perl application which contains a Perl/TK based GUI ( some checkboxes, entry fields, etc.)
I have been asked to modify the Perl / TK GUI part of the application so that it can be run inside a web page. Is this possible?
I found this:
http://oreilly.com/openbook/webclient/ch07.html
however it appears to create a web client and parsing the HTML response to format the output, as opposed to running inside a browser.
I would like to know if it is possible to somehow incorporate a Perl/TK GUI into web browser and if so what is the best way to do so? Maybe something like a plugin (ex. http://www.tcl.tk/software/plugin/)?
The usual way would be to rewrite your application in HTML/CSS/JavaScript. The example you show on the O'Reilly site does the opposite - it shows you how to write a Tk application that will render HTML.
A browser plugin is possible if that will provide what you need. If that is the case then the problem is trivial, but you would need the plugin installed on every PC that needs to have access to your application, and it is possible that there are certain Tk facilities that the plugin doesn't support. All you can do is try it.
There was a project for Netscape that was mentioned in Mastering Perl/Tk called PerlPlus. But it looks like the Sourceforge page hasn't been touched in a while. The intent was to run Perl (and PerlTk) code in a Netscape browser.

Convert Sandcastle Help File Builder Output (Web site) to MediaWiki format

I need to
convert my Sandcastle Help File
Builder (SHFB) output that is a Web
site (HTML) to Media wiki format
Find a way to transfer/include the
converted pages directly into the
MediaWiki we have set up.
Any ideas? we have over 1000 pages of HTML files inthe Website (output of SHFB).
I thought of using a html2wiki converter ..I could think of looking around for a script to convert those 1000 pages into wiki format... that could take care of (1).
But I would still be left with the block in the last bit of the pipeline - how to feed converted pages directly into the Wiki?
Take a look at Help Server. It allows to publish .CHM / .HxS produced by any tool (including Sandcastle) on the web and provides URL-based integration API.
We use MediaWiki as well. A set of templates for it allows us to create links to class reference shared by Help Server. Some examples of such links can be found right on that page.
Note that DataObjects.Net Help web site is running on Help Server 2.X, but the newest one is 3.X (example web site is here).
I did some work with ingesting existing material from several sites into a comprehensive Wiki. It did not involve Sandcastle, but if you're dealing with HTML it shouldn't matter much. html2wiki extensions are out there, and from what I have read they can solve a lot of problems. I needed a little more control over each node in the DOM, so i used Simple HTML DOM Parser. It's in PHP and was easily dropped into Mediawiki's includes.
For creating the new pages, I ended up writing a small script that uses Mediawiki's Article class, specifically the doEdit function. this allows you to create new articles programatically, without user interaction. Of course, you'd want to be careful with this... The last thing you need is to create 1000 pages that are no good and have to be deleted. But perhaps this will help get you going.

Version control for VBA file

I have a huge MS Access document with built-in VBA codebase. Is it possible to track the file (as I am developing it) with a (mercurial) version control system? Can I extract code and track that? Or is it just the-binary-file-path? Thanks.
It's possible with MS Access to export most of the code through scripts. I posted some here a while ago:
How do you use version control with Access development?
It's possible to version-control binary files, but it would be a little cleaner (IMO) to have the code separate. If it works for you though, then by all means do what you do.
There is a nice tool here https://github.com/hilkoc/vbaDeveloper .
It allows you to easily export and import all your vba code and can do this automatically as soon as you click 'save'.
The export files are all plain text which you can then put in version control in the usual way.
Access all the way up to 2010 has supported source code control, and that includes support for team foundation server. The fact that you place all files in ONE zip file, one folder on a hard drive, or one container called an accDB is a MOOT point. As long as EACH individual object can be viewed as a SEPARATE object, then why do you care if one is using a zip file, or an accDB file? This is a “logical” view vs a physical view issue.
The simple matter is EACH OBJECT IN ACCESS CAN BE EXPORTED AS A TEXT OBJECT. Thus Access has supported source control integrate using this ability with the standard Microsoft SCC interface since Access 97 (that is 17+ years!!).
When you use SCC such as Visual Source safe or Team Foundation server then the BUILT IN UI in Access supports display the objects status in question. You have resolution down to the form, report, sql query and code module level. So multiple developers can all work on the application at the same time. They only need check out the forms, reports quires etc. they are working on. Each developer thus has their own local build.
If using Visual Source Safe, then you see this in the ribbon:
If you using team foundation server, then you see this:
And for objects checked out, you see this:
And when you open, or even right click on an object, you see these additional options:
Of course given that “few” use this feature or even know what it is (and the posts on SO confirm this lack of knowledge), then it is LITTLE surprise that the feature was dropped in Access 2013 after all these years!. However some 3rd party add-ins claim to restore this ability. So the ability to export objects in 2013 as individual text files STILL remains in place.