Forms writing to txt-files

V

Vincent

What I want:
A template containing two things:
1. Showing what a specific txt-file contains. What comes to mind is having a
form doing the job. The file in question never exceeds 30-40 words, so a form
would be quite sufficient for this.
2. Allowing the user to alter/edit this text

and/but/however

2.1. when clicking a save/complete/append button I want the form to save in
txt-format.

The reason I want this done in office, is to take advantage of the superior
spelling/error-control that Word provides.
So far I’ve come nowhere, I'm stuck.
Any help out there?
 
V

Vincent

1. Surely a form can show/mirror/replicate (DunnoWhatItsCalled) the contents
of a single text-file, just as it can do dealing with a doc-file.
However - I cannot recall how this is done, in either way (with a doc-file
or in a txt-file).
2. furthermore; to have Word open/save this file in a txt-format i.e. not
words “own†default format.
I'm confident that I after some “poking†will solve the latter question. The
former one remains a question mark to me.
Can it be done? Can Word treat a txt-file as it were a regular doc-file?
 
D

Doug Robbins - Word MVP

Use an INCLUDETEXT field to display the contents of the .txt file, unlink
the field so that the user can edit the text, then do a save as text.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
V

Vincent

I. like just about anyone here, claims to be nothing other than if not
novice, then "sub-novice". Although I might know more than the average Joe on
my street, about these things and indeed even though I do have learning curve
way steeper average I would appreciate some sort of example - i.e. code.
As far as I know I'm not even sure whether the "includetext - thing" is
something embracing VBA-forms or “regular†forms (as in the ones used for
mixing letters and addresses). Given the context I conclude that it has
something to do with VBA. Time to hit the books I guess.
I’ll commence right away, thank you.

/Vincent


"Doug Robbins - Word MVP" skrev:
 
J

Jezebel

You're right that it's a challenge picking the right level for responses,
but 'like just about everyone here' is not a useful generalisation. If you
read jsut the past week's posts, you'll see that they range from people
wanting to someone else to write a full application for them, to people who
expect Word to do everything but clean their teeth for them.

In between those, there is a large group who expect detailed answers and
custom-written code snippets, but who won't take the time to learn the
rudiments of Word's 'advanced' features, like the use of fields. You, for
example, have obviously never taken the time to read through the list of
field codes (Insert > Field) because if you had, you'd know what an
IncludeText field is. Doug was suggesting a non-macro solution to your
problem (so there's no sample code to offer).

Or perhaps you're hoping for a tutorial on fields while we're at it. Do you
want fries with that?
 
V

Vincent

Ah, if it things were possible to retract, like the lines I sent earlier.
Youre right of course, at least mostly. Sorry – never meant to. . .
Although the snippets I do find on these pages are what really help me, it
by far nothing to expect. Let alone a full application.
As for my generalisation not being useful, you spend lots of time on these
pages. The impression I got, that I still have, is that on these specific
webpages – dealing with VBA, i.e. programming – Word Programming, was that
the topic at hand was – programming.
Not that I have anything against other features Word provides, the use of
fields being one, but this was not what I expected. After trying, searching
then realizing this had nothing to do with VBA, I write. Reading this now I
myself, can only regret the somewhat acidic tone of my writing.
I am currently working with getting familiar with Field Codes – again. For
of course I’ve spent time learning this. But that was before I learnt enough
VBA to leave that behind. As far as I know – field codes are still not able
to work with other applications, not the way VBA can. Then again, maybe I'm
wrong about this as well, maybe I should take time to learn more of this…




"Jezebel" skrev:
 
J

Jezebel

You're quite right that fieldcodes can't work with other apps (at least not
vey much, and certainly not like VBA). They do provide a stable method for
VBA to interact with the document content.
 
V

Vincent

This is sad. Everything would be somuch easier if. . . I did spend a while
trying to figure out whether XML could be something (the
SaveNothingButData-sort). Never did make that work either.
I don’t know enough of this (XML), therefore I cant really say whether
something works or not. Actually it became clear to me just recently that
often is no need to use Acrobat, XML works just as fine, or should I say:
better.
What I do have is the Fieldcode “includetextâ€. This works fine, up to a
point. For I would prefer to present an environment for the presumptive user
where the ways to “messup†are minimized, as in a user-form. Only thing I
never did make work in a user-form was the spell-proofing. This being one of
the things that have a potential of going wrong – I would like this to work
as well.
Anyway – thanks for everyone’s efforts
Vincent
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top