TechWhirl (TECHWR-L) is a resource for technical writing and technical communications professionals of all experience levels and in all industries to share their experiences and acquire information.
For two decades, technical communicators have turned to TechWhirl to ask and answer questions about the always-changing world of technical communications, such as tools, skills, career paths, methodologies, and emerging industries. The TechWhirl Archives and magazine, created for, by and about technical writers, offer a wealth of knowledge to everyone with an interest in any aspect of technical communications.
Subject:Problem pasting/inserting MS Word file? From:"Hart, Geoff" <Geoff-H -at- MTL -dot- FERIC -dot- CA> To:"TECHWR-L" <techwr-l -at- lists -dot- raycomm -dot- com> Date:Thu, 16 Aug 2001 08:08:58 -0400
Paul Moloney reports: <<I'm using Perl to auto-generate a large document (a
500K htm, no images) and have
tried several different methods of inserting this into a pre-existed
Microsoft World document:... Each method causes MS Word to crash and yields
the same error message:>>
Sounds like your Perl script is doing something wrong in creating the file
(perhaps failing to write a correct end-of-file marker?) and that you might
have to go back and take a closer look at your script. But in the meantime,
if the file is mostly valid, you should be able to open the HTML file you're
creating in any Web browser or Web authoring tool and save it as text; if
not, then you know for sure that it's the Perl and not Word that's causing
the problem. You'll lose formatting if you proceed via text, but at least
you'll be able to import the file. If the software you use to create the
text file retains the HTML tags, you can search for those tags and replace
them with formatted text*; check out the online help for Word's advanced
search and replace for details on applying formatting via the search
function. If you're going to do that a lot, you can always write a macro to
automate the worst of the cleanup.
* For that matter, if you open the file in your Web browser and choose "view
source", you'll open the entire tagged file in a text editor (probably
WordPad unless you've define Word as your viewer). Select all, copy, and
paste this into Word. Now you've got the tags and the text, and the cleanup
should be easy. Again, you'll probably want to write a macro if you do this
a lot.
--Geoff Hart, FERIC, Pointe-Claire, Quebec
geoff-h -at- mtl -dot- feric -dot- ca
"User's advocate" online monthly at
www.raycomm.com/techwhirl/usersadvocate.html
"The most likely way for the world to be destroyed, most experts agree, is
by accident. That's where we come in; we're computer professionals. We cause
accidents."-- Nathaniel Borenstein
*** Deva(tm) Tools for Dreamweaver and Deva(tm) Search ***
Build Contents, Indexes, and Search for Web Sites and Help Systems
Available now at http://www.devahelp.com or info -at- devahelp -dot- com
A landmark hotel, one of America's most beautiful cities, and
three and a half days of immersion in the state of the art:
IPCC 01, Oct. 24-27 in Santa Fe. http://ieeepcs.org/2001/
---
You are currently subscribed to techwr-l as: archive -at- raycomm -dot- com
To unsubscribe send a blank email to leave-techwr-l-obscured -at- lists -dot- raycomm -dot- com
Send administrative questions to ejray -at- raycomm -dot- com -dot- Visit http://www.raycomm.com/techwhirl/ for more resources and info.