3
голосов
2ответов
500 просмотров

Primitive MailMerge using just delimited field names

Obviously the correct way for our app to generate a Word document based on a template is to encourage the admin users (who will look after the templates) to embed the correct merge fields or bookmarks in the template document. However in the past we have found our typical admin user who ordinari...

0
голосов
3ответов
290 просмотров

What's the easiest way to generate DOC files?

Right now I'm generating HTML with a Perlscript, and then manually converting to DOC in OpenOffice. Actually I have to copy, create new "Text document", paste, save, as it treats HTML and DOC as separate file types, but that's quite unessential. That's very inconvenient. Is there any automated w...

1
голосов
1ответов
306 просмотров

Is there any metadata associated with word document?

I am trying to generate check sum of a word document by opening at binary level. I generate the check sum of the document. Copy the document to a different location. When I generate the checksum at the new location I get a different value though I haven't changed the contents of the document. The...

2
голосов
2ответов
1361 просмотров

Developing Word add-ins for Macintosh

I have an add-in for Word 2007 developed using VS2008/.NET 3.5. What do I need to do in order for Mac users to use this add-in with their Word 2008? (or did MS make sure it would be impossible to do...)

16
голосов
6ответов
81290 просмотров

iTextSharp - Convert word doc/docx to pdf

I understand iTextSharp can be used for converting a document to pdf. But first we have to create a document from scratch using iTextSharp.text.Document and then adding elements to this document. What if I have an existing doc file, is it possible to convert this document to pdf using iTextShar...

1
голосов
1ответов
344 просмотров

Links to ASP.NET application in MS Word document

I am observing a weird behavior when clicking links to my ASP.NET application in MS Word 2003 / 2007 document. I have IE8 installed. When I click a link in the document the request that is sent has the user-agent IE7(!?). A new session object is created. Right after that out of nowhere a second ...

1
голосов
1ответов
104 просмотров

Starting Word from Access - 2nd time fails

When starting up Word from a form in Access, I do this: Dim wordApp As Word.Application Dim wordDoc As Word.Document Dim wordRange As Word.Range Set wordApp = CreateObject("Word.Application") wordApp.Visible = True Set wordDoc = wordApp.Documents.Open(etikettenTemplate) ...

0
голосов
1ответов
1764 просмотров

How to wrap report for Word output in JasperReport?

I have report where report width is more than 2000px; it is working fine with pdf and excel output but when we export for word it is showing 550px; report only other part we are not able to see. We have one report which contains ... abcdefghijklmnopqrstuvwxyz when we export for excel or pdf it...

0
голосов
4ответов
463 просмотров

ASP.NET Session issues

I have been struggling with a following problem. I have an ASP.NET application that has a certain search engine. It is possible to perform the searching by using prepared links. So I have a MS Word document that contains the links. When I click such a link a new IE8 window is opened, an ASP.NET s...

3
голосов
1ответов
743 просмотров

A more complex word macro then I'm used to (i.e. I can't record it)

I am trying to write a word macro that Selects everything that is Heading 2 (or any specific style), copies it and pastes it into an Excel document. Macro recording doesn't work here and I'm stumped as to the syntax for the necessary commands. Is it possible to do? P.S. It would be really great ...

0
голосов
1ответов
1322 просмотров

How to replace a section in a word template with multiple fields C#

I'm creating a C# application that fills the MergeFields defined on a MS Word document with data from an external Data Source. I'm using the OpenXml SDK and everything works fine when replacing single fields. What I want to do is, to have a section with several MergeFields defined and being abl...

3
голосов
2ответов
1198 просмотров

Saving Word 2007 Document Properties in C# 2.0

I'm trying to modify some CustomDocumentProperties for a .docx document. I've been able to read the current value and modify it, but when I save the document the changes to the custom fields are lost. I have the following method within a DocAccessor class (which serves as an interface for my do...

3
голосов
1ответов
4281 просмотров

Replace MergeFields in a Word 2003 document and keep style

I've been trying to create a library to replace the MergeFields on a Word 2003 document, everything works fine, except that I lose the style applied to the field when I replace it, is there a way to keep it? This is the code I'm using to replace the fields: private void FillFields2003(string te...

1
голосов
1ответов
289 просмотров

Restart list numbering in word for each new list created

I am exporting content from a jsp page into MS Word using javascript. When the user is in Word there is a table with 10 rows and 2 columns, A & B. The user creates an ordered list in row 1, column A like this: 1 dog 2 cat 3 mouse if the user then creates a second list in row 1 colum...

0
голосов
1ответов
1975 просмотров

MS Word Interop: Cancel (Don't Show) the 'Save Changes' Dialog on Close

I'm using MS Interop to open a generated file for a user, allow them to edit it and then close it, after which I save it for them (it's part of a larger process). Since the user doesn't need to save the file manually I would like to cancel that pop up dialog to save the file when the user tries t...

3
голосов
1ответов
144 просмотров

Programatically get the number of visible chars on a line before the cursor in Microsoft Word, using C++

My program reads text from a number of applications so that handicapped children can hear it. To do this, it has an internal buffer where the text is, and an internal representation of where the cursor is. So, if the cursor is | the result for this line would be 21 (or thereabouts) :) Now, to g...

1
голосов
1ответов
334 просмотров

Why doesn't SaveAs use correct PixelsPerInch in macro?

I have a macro which converts Word docs to htm. The problem is that the images are always saved as 96 ppi, even though I have specified 240 ppi. Any ideas on how to fix? Here is my macro: Sub Doc2htm() With ActiveDocument.WebOptions .RelyOnCSS = True .OptimizeForBrowser = ...

1
голосов
1ответов
3949 просмотров

Open multiple copies of Word template document using VBA for applications

I am developing a database application where users open a Word template document and merge this with database records. I have successfully written code that does this for one record where I open a template file and replace items in the template document with DB data. I have tried opening the temp...

8
голосов
7ответов
24454 просмотров

reading docx (Office Open XML) in PHP

I want to add an word import function to our CMS, the only problem I cannot seems to find a good library for reading docx files (Word 2007). Do anyone has some recommendations, the library should be able to extract content of the document and basic styling like italic, bold, superscript? Thank...

6
голосов
1ответов
4619 просмотров

Replace text using regular expressions in MS Word - C#

I have a Word document that I want to open and replace all instances of a social security number with the word, "test". I already have the code to open the document. Here's the code that would do the replacement. However, I'm having trouble with using regular expressions at this point: _wordApp...

1
голосов
2ответов
754 просмотров

Why doesn't the wdBorderVertical exist when using a range of cells instead of a selection?

FYI, I'm using Perl and Win32::OLE, but the error is a Word VBA one. Using Perl's Win32::OLE module, I'm trying to create a table in Word and format certain elements of it. I created the table (15 x 3) and successfully created a range object pointing to the cells from (2, 1) to (14, 3), i.e. all...

1
голосов
3ответов
688 просмотров

Added Word Doc to CVS - became corrupt

I'm using CVSNT. I added a Microsoft 2007 docx file "as text" to the repository. After committing and before updating I tried to open the file again but was unable to. It said it was corrupt. I tried using the office word doc recovery and that was unable to recover the document. From what I u...

0
голосов
2ответов
4501 просмотров

Word VBA Section break character in

How can you detect if the selection you have contains or is the section break character? At the moment I select a page , collapse to the end , I want to know if the end of the page contains a section break or not. I was going to use a method where I compare the section number at the end of the ...

1
голосов
2ответов
1406 просмотров

Using cfcontent in ColdFusion 7, how do I output an MS Word doc in landscape mode?

The title is pretty self explanatory. I'm using cfcontent in ColdFusion 7 to output a page as an application/msword file type and I want to know how to make it default to landscape mode without resorting to downloading a third party library.

7
голосов
1ответов
15814 просмотров

Using VBA for Word, how do I create a range of table cells?

I'm trying to learn how to handle Range objects in Word VBA with regards to MS Word tables. Using the Range object help, it would seem I can create a range of cells as long as the cells are contiguous, however I cannot seem to get the syntax for specifying the Start and End points of the range u...

1
голосов
2ответов
986 просмотров

Word COM/OLE/VBA: How to save to/load from memory a document?

According to the 'Microsoft Office Word™ 2003 Visual Basic Reference', it seems the Document object can only load a file from disk or save a file to disk. Is it possible to save a document to memory or load a document from memory? Since I need to save the documents to a database instead of to dis...

2
голосов
4ответов
3045 просмотров

Word macro cannot save filename> 255 characters

I have this in my Word Macro ActiveDocument.SaveAs FileName:="D:\GrooveAndRock\GrooveAndRock\GrooveAndRock\GrooveAndRock\GrooveAndRock\GrooveAndRock\GrooveAndRockAndRoll\GrooveAndRockAndRoll\GrooveAndRockAndRoll\GrooveAndRockAndRoll\GrooveAndRockAndRoll\GrooveAndRockAndRoll\Ug F Blug and Bug f G...

4
голосов
3ответов
12642 просмотров

How to generate Word document(doc,docx) in ASP.NET?

How to generate Word document(doc,docx) in ASP.NET?

0
голосов
3ответов
64 просмотров

Is it safe to store and version WordprocessingML documents in Subversion?

Is it safe to store WordprocessingML documents in Subversion and perform conflict resolution on them? Not talking about OpemXML here - I'm wondering about Word's original single XML file format with binary image data, etc. all in a single text XML file.

5
голосов
1ответов
3944 просмотров

How can I open a Word document read-only from Perl?

Is there any method within Perl which would allow me to get the object in a read only mode, so as to avoid the dialog that pops up if the file is locked by another user? $document = Win32::OLE->GetObject("$docFile") or die "can't open $docFile";