ms-office

Formatted output in OpenOffice/Microsoft Word with Python

让人想犯罪 __ 提交于 2020-01-12 19:29:41
问题 I am working on a project (in Python) that needs formatted, editable output. Since the end-user isn't going to be technically proficient, the output needs to be in a word processor editable format. The formatting is complex (bullet points, paragraphs, bold face, etc). Is there a way to generate such a report using Python? I feel like there should be a way to do this using Microsoft Word/OpenOffice templates and Python, but I can't find anything advanced enough to get good formatting. Any

Formatted output in OpenOffice/Microsoft Word with Python

一笑奈何 提交于 2020-01-12 19:29:30
问题 I am working on a project (in Python) that needs formatted, editable output. Since the end-user isn't going to be technically proficient, the output needs to be in a word processor editable format. The formatting is complex (bullet points, paragraphs, bold face, etc). Is there a way to generate such a report using Python? I feel like there should be a way to do this using Microsoft Word/OpenOffice templates and Python, but I can't find anything advanced enough to get good formatting. Any

How to convert Word and Excel documents to PDF programmatically?

我的梦境 提交于 2020-01-12 07:55:27
问题 We are developing a little application that given a directory with PDF files creates a unique PDF file containing all the PDF files in the directory. This is a simple task using iTextSharp. The problem appears if in the directory exist some files like Word documents, or Excel documents. My question is, is there a way to convert word, excel documents into PDF programmatically? And even better, is this possible without having the office suite installed on the computer running the application?

Creating a multi-level bullet list with Word.Interop

余生颓废 提交于 2020-01-12 05:37:05
问题 I need to create a multi-level bullet list via Microsoft.Office.Interop.Word and I am currently struggling with its (horrible) API (again). I've just created the following example (not dynamic yet, just for demonstration purposes) in a VSTO document-level project for Microsoft Office Word 2010 in the programming language C#: Word.Paragraph paragraph = null; Word.Range range = this.Content; paragraph = range.Paragraphs.Add(); paragraph.Range.Text = "Item 1"; paragraph.Range.ListFormat

DEL and BACKSPACE keys get eaten from WebBrowser

你离开我真会死。 提交于 2020-01-11 09:08:48
问题 I have a custom task pane in a VSTO Outlook add-in which hosts a System.Windows.Forms.WebBrowser control. All works well but in web forms DEL and BACKSPACE keys do not work. As if something eats those keys before they get to the browser. Any pointers are appreciated. EDIT: It seems that clicking the WebBrowser does not activate the parent task pane. If I add a simple TextBox as a sibling to WebBrowser and then click TextBox with a mouse, task pane's title bar color changes indicating it got

Add MS Office Documents to PDF via Apache PDFBox

…衆ロ難τιáo~ 提交于 2020-01-11 02:27:11
问题 I'm using Apache PDFBox (http://pdfbox.apache.org/) for creating PDFs out of an arbitrary amount of files, including Images and other PDFs. Now I need to add MS Office Documents (Word, Excel and Outlook MSGs) to the PDF. The files can have nearly every Office Version, so it is not granted that the file is a new office file (e.g. docx) or an old one (e.g. doc). Is there any way to do this only with free tools? My first idea is to read the contnet of every file with Apache POI (http://poi

VBA: How to display an error message just like the standard error message which has a “Debug” button?

大城市里の小女人 提交于 2020-01-10 07:54:30
问题 As usual, I create an error-handler using On Error Goto statement, there I put a few lines of cleaning codes and display the error message, but now I don't want to lose the comfortableness of the default handler which also point me to the exact line where the error has occured. How can I do that? Thanks in advance. 回答1: First the good news. This code does what you want (please note the "line numbers") Sub a() 10: On Error GoTo ErrorHandler 20: DivisionByZero = 1 / 0 30: Exit Sub ErrorHandler:

Basic Syntax and Examples Tutorial [closed]

荒凉一梦 提交于 2020-01-09 08:00:27
问题 It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 7 years ago . At work I work closely with MS-Office. I have managed to generate some scripts that perform various tasks. While I can port functions to VBA with some difficulty, I do not fully understand the foundations of the

VBA Outlook Mail .display, recording when/if sent manually

人盡茶涼 提交于 2020-01-09 05:32:08
问题 My code displays a message with basic subject, body, attachment. Next the user manually updates and customizes the message and should send it. I want to record when (if) the email is sent. Is this possible or any tips? My environment is Office 2007 with an excel based macro going to Outlook. [Excerpt] Dim OutApp As Outlook.Application Dim OutMail As Outlook.MailItem Set OutApp = CreateObject("Outlook.Application") OutApp.Session.Logon Set OutMail = OutApp.CreateItem(olMailItem) With OutMail

Procedure Too Large

青春壹個敷衍的年華 提交于 2020-01-09 03:50:06
问题 I received this error message - Procedure too large - in VBA. What is the reason and way out for this error? 回答1: You probably have one or more gigantic procedures/functions and I think VBA has a limit of 64k or something per procedure. You fix it by splitting that procedure up into multiple procedures that can then be called by the one procedure. So instead of having: Sub GiantProcedure() ... ' lots and lots of code End Sub You'd have something like: Sub GiantProcedure() ... ' a little bit