Using vba to copy the contents of a word document into another word document
location: linuxexchange.com - date: November 2, 2015
I haven't used VB for years, so please forgive me if this turns out to be obvious. I'm trying to write a word vba macro for use in a template which will display a userform and then import the contents of fileA.docx, fileB.docx, or fileC.docx depending on the userform. (After that I'm going to use bookmarks to fill in some form data, I don't know if that's relevant). Files A, B, and C will contain text with some basic formatting such as lists, but nothing fancy.
The solutions I've seen online can copy the contents of file to a new file, but ideally I would like to import the entirety of one of those files into the new, currently unnamed file that I'm getting from the template. I think where I'm running into problems is with switching the selection to one of those files, and then back to the new unnamed document, though I could use a hand to make sure I'm copying correctly as well.
Update: I was making things too hard, though the answers here got me pointed in the right direction (th
How to manipulate drawings placed inside tables in a MS Word document on MSWord 2010?
location: linuxquestions.com - date: July 13, 2015
I have to translate a text file that has been imported to a MS Word format from a PDF file. The file has checkboxes that are actually predefined square shapes on MS Word. When editing and translating the document, the text becomes larger, so the pieces of text that are below get moved further down.
The problem is I can't move the checkboxes that correspond to these pieces of text IF they are inside tables. I can move and delete without issues the ones that are outside tables, but the ones inside them are like locked. I can't even select them, so I can't do anything with them (which is a problem because they should go beside the text that has been moved down).
I am attaching a sample of the text I am edting so you can appreciate what I mean. By the way, this problem occurs only when using MS Word 2010. I can move/delete the checkboxes on LibreOffice on Linux, but I must keep the whole file compatible with MS Word, so I can't just edit it on LibreOffice because it would garb
How to convert a CGM document into PDF format?
location: linuxquestions.com - date: July 10, 2009
Hi guys, I need to convert a CGM document into PDF format. Pls help me
Scan document to searchable PDF
location: ubuntuforums.com - date: April 17, 2011
I've read a bit here about making PDF's searchable using a bunch of different programs and utilities. It seams with errors and I'm not sure if it has been ironed out.
I have hundreds of old documents that I need to scan. I would like to scan them to searchable PDF's. I won't have issue scanning them to plain PDF's, but how do I make them searchable. Is there a scanner available to ubuntu that will do this, currently I have simple scan.
Will sane do this (OCR)?
linux wine Word interop application.Documents.Open opens a document in word but does not return the document to the client
location: linuxexchange.com - date: January 1, 1970
For reasons that are too hideous to mention I would like to be able to do MS Office Automation under Wine. However the noddy program below fails to get the document object from the instance of WinWord, though the document has been successfully opened by WinWord running under wine.
// This code is lifted from http://www.dotnetperls.com/word
static void Main(string args)
if (args.Length < 1)
Console.WriteLine("Usage WordTest word.doc");
String docname = args;
Application application = new Application();
Document document = application.Documents.Open(docname);
// Loop through all words in the document. (We get an exception here)
Is it possible to print a HTML document into PDF by conserving all links and anchors?
location: linuxquestions.com - date: February 11, 2013
OS: Fedora Core 17 (x86_64)
I have a very big HTML file which I want to print/convert into a PDF file. While the browser (firefox) is open, I just go to file > print and then I chose the PDF option in order to print the content into a PDF file. This works pretty well and fast (less than 40 seconds for producing a big PDF file about 36 MB).
The only problem is that there are a lot of hypertext links (or rather to say anchors as it is a big single HTML document) which obviously facilitates considerably the navigation in the document. Well, the problem is that non of these links are conserved once the PDF file has been created.
After a lot of Googling I found a tool called wkhtmltopdf which apparently does the job as I expect by conserving the links. I installed it successfully, yet once I launched the program to create the PDF file in command line mode, it has been running (on the 4th step resolving links) for more than 2 hours and therefore I was wondering whet
import xml document into open office using xslt
location: linuxexchange.com - date: February 10, 2013
I am at the early stages of building an xslt document to import xml data into a libre office spreadsheet. The xml data represents a graph (with nodes and edges) in xgmml format. At this stage I am simply(?) trying to select all of the nodes in the graph, extract the "label" attribute, and place each label in a cell on a single row in the spreadsheet.
I am able to install the .xslt in libre-office and open .xgmml files.
I am able to use the .xslt to extract some data from the .xgmml and add it to the spreadsheet
But, For some reason I am unable to select the nodes and extract the label.
Can some-one please point out my (undoubtedly) silly error?
The .xgmml .xslt and .odt documents that I am working are as follows:
<?xml version="1.0" encoding="UT
Loading a document into LibreOffice from a URL that uses an untrusted SSL certificate
location: linuxexchange.com - date: January 1, 1970
I have a Web servlet (running under Tomcat) that loads a Word document from a supplied source URL and feeds it to LibreOffice to be converted to PDF. Here is the code (it's rather quick-and-dirty at the moment):
// Open office document
XComponentLoader xCompLoader = UnoRuntime.queryInterface(com.sun.star.frame.XComponentLoader.class, desktop);
XComponent document = xCompLoader.loadComponentFromURL(m_srcURL, "_blank", 0, getInputProperties());
private PropertyValue getInputProperties()
propertyValues = new PropertyValue;
propertyValues = new PropertyValue();
propertyValues.Name = "Hidden";
propertyValues.Value = true;
It's working fine for any source URLs that use HTTP, but when I try to load content from a source URL that uses an untrusted (or "self-signed") SSL certificate, LibreOffice throws this stack trace:
com.sun.star.lang.IllegalArgumentException: Unsupported URL <htt
Exception on inserting into Access 2010 in C Sharp
location: linuxexchange.com - date: December 26, 2010
I am getting this exception when inserting into a Access 2010 database.
Example, the following :
INSERT INTO CranbrookMain (
) VALUES (
'Service Inc.','520B SLATER ROAD N.W.','CityName',
'CityName ☺ '
Results in the exception:
Ex: System.Data.OleDb.OleDbException (0x80040E14):
Syntax error in string in query expression ''CityName ☺'.
at System.Data.OleDb.OleDbCommand.ExecuteCommandTextErrorHandling(OleDbHResult hr)
at System.Data.OleDb.OleDbCommand.ExecuteCommandTextForSingleResult(tagDBPARAMS dbParams, Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteCommandText(Object& executeResult)
at System.Data.OleDb.OleDbCommand.ExecuteCommand(CommandBehavior behavior, Object& executeResult)
What is the best way to insert source code examples into a Microsoft Word document?
location: linuxexchange.com - date: July 31, 2010
I have to write some documents that will include source code examples. Some of the examples will be written from the IDE, and others would be written in place. My examples are primarily in Java.
As someone who is used to LaTeX, doing this in Word is extremely painful. However, I am bound to Word for this. The only options I have seen are:
Write or copy into the document,
then use a fixed type font, arrange
formatting and hope that Word didn't
uppercase stuff for you. Needless to
say, this looks like crap.
Copy and paste screenshots of source
code from the IDE. At least I keep
colors. However, if I change my font
size, I'm screwed. I'm also screwed
across page boundaries. And let's
admit it, Word is not great at
managing multiple images on a
Write HTML (not really an option
Is there some better (and ideally portable) way to do this? Is there at least some sort of verbatim style similar to the LaTeX environment? Is there at least some pretty printer that I could copy
Page: 1 2 3 4 5 6 7 8 9 10