Thanks,
Your friend Kip
--
Please post your response to the newsgroup.
http://www.standards.com/ipusers/standards; Word macros, including
converting from WordBasic to VBA; Technical writing and reviewing; Standards
------------------------------------------------
"Kip Fryman" <k...@NOSPAM.com> wrote in message
news:eHc9Hfb#AHA.2016@tkmsftngp03...
Regards
Dave
"Kip Fryman" <k...@NOSPAM.com> wrote in message
news:eHc9Hfb#AHA.2016@tkmsftngp03...
"Dave Rado" <dr...@onetel.net.uk> wrote in message
news:eNxsXnb#AHA.2028@tkmsftngp05...
I figure just strip them all to be safe before sending them to the customer.
"Howard Kaikow" <kai...@standards.com> wrote in message
news:#IXLyjb#AHA.2224@tkmsftngp07...
--
Please post your response to the newsgroup.
http://www.standards.com/ipusers/standards; Word macros, including
converting from WordBasic to VBA; Technical writing and reviewing; Standards
------------------------------------------------
"Kip Fryman" <k...@NOSPAM.com> wrote in message
news:eQqpxrb#AHA.1924@tkmsftngp02...
Kip
"Howard Kaikow" <kai...@standards.com> wrote in message
news:#JdHSXc#AHA.1608@tkmsftngp03...
Take a look at the following article
How can I get access to the Document Properties of a Word file without
opening the document?
http://www.mvps.org/word/FAQs/MacrosVBA/DSOFile.htm
One of the properties of a Word document that you can access is "HasMacros".
It is either True or False. For those docs for which it is true, you do the
Save As RTF/Resave as doc routine.
--
Regards
Jonathan West - Word MVP
MultiLinker - Automated generation of hyperlinks in Word
Conversion to PDF & HTML
http://www.multilinker.com
Word FAQs at http://www.multilinker.com/wordfaq
Please post any follow-up in the newsgroup. I do not reply to Word questions
by email
"Kip Fryman" <k...@NOSPAM.com> wrote in message
news:eHc9Hfb#AHA.2016@tkmsftngp03...
I have used the DSOFile application in the past and found the results to be
innacurate. Charachter and line counts were innacurate as well as other
statistics. I am not even sure how reliable the HasMacros property would
be. If its not 100% then there is no point of even considering using it.
Also I cannot save as RTF from a Word doc for obvious reasons. They were
created as Word documents and transforming them to RTF could have bad
ramifications. Im not about to even do that.
Thanks,
Kip
"Jonathan West" <jw...@mvps.org> wrote in message
news:uDtJ$cd#AHA.2020@tkmsftngp03...
As far as am aware, there is no ptoblem with dsofile. The reason things
like the line count are frequently inaccurate is that Word saves documents
without always updating the statistics.
My use of the HasMacros property has always been reliable.
> Also I cannot save as RTF from a Word doc for obvious reasons. They were
> created as Word documents and transforming them to RTF could have bad
> ramifications. Im not about to even do that.
Again, I haven't had any problems in that direction, with a simple save and
save back. Another Alternative is to use the OrganizerDelete method to
remove any modules. Be aware though that this will not remove the
ThisDocument module if present.
Yes that seems to be the issue.
> My use of the HasMacros property has always been reliable.
I will have to look into it.
> Again, I haven't had any problems in that direction, with a simple save
and
> save back. Another Alternative is to use the OrganizerDelete method to
> remove any modules. Be aware though that this will not remove the
> ThisDocument module if present.
Actually now that I think about it if it is just a quick save, resave the
document should remain intact. This would not be the case if it was
re-opened as an RTF file. But I wonder if it would remove the Macros right
away or if it would wait until it was reopened as well.....
Thanks again,
Kip
Saving as RTF strips out the macros - RTF has no facility for the macro code
to be stored in the document. Therefore a save & resave is guaranteed to get
rid of any macros.
How has at worked for you?
How many documents have you applied this on?
Does this run in an unattended fashion?
"Jonathan West" <jw...@mvps.org> wrote in message
news:ucH0u7w#AHA.1712@tkmsftngp05...
> Does this run in an unattended fashion?
It'd be a simple matter to write a macro that opens each .DOC file
in a folder (and, optionally, its subfolders) and resaves it in RTF
format. That's probably about as unattended as it gets.
-- Mark Tangard <mtan...@speakeasy.net> ----------------------------
------ WWW: http://www.speakeasy.org/~mtangard ----------------------
------------- "Life is nothing if you aren't obsessed." --John Waters
---------------------------------------------------------------------
I know how to do it, but I was just wondering what Jonathan's experience
with it was. I currently have an unattended system that I developed that
does things with word files and it would be easy for me to add this as an
optionl componant.
Getting an insight of others past experience is what I was aiming for
"Mark Tangard" <mtan...@speakeasy.net> wrote in message
news:3B3366AA...@speakeasy.net...
Yes
>
> How has at worked for you?
Take a look at the following article for an example
How can I get access to the Document Properties of a Word file without
opening the document?
http://www.mvps.org/word/FAQs/MacrosVBA/DSOFile.htm
It includes a template that you can download and use which will print
selected properties of all the files in a folder. Adapting that, and
resaving files whose HasMacros property is true is only a few lines of code.
>
> How many documents have you applied this on?
Hundreds
>
> Does this run in an unattended fashion?
Yes
A more certain way is as follows. I've used this often, but not in
macros.
1. Save the document as a template.
2. Open a document based on the new template.
3. Save the new document with the required name.
Andrew
--
Andrew Gabb
email: ag...@tpgi.com.au Adelaide, South Australia
phone: +61 8 8342-1021, fax: +61 8 8269-3280
-----
Clever idea. However, each version of Word uses it's own version of RTF; and
I'd be interested to see a sample document that loses formatting when saved
as RTF and back by the same version of Word, as I've not seen one yet; and
like Jonathan, I've saved hundreds.
Regards
Dave
"Andrew Gabb" <ag...@tpgi.com.au> wrote in message
news:3B33F381...@tpgi.com.au...
Please post your response to the newsgroup.
http://www.standards.com/ipusers/standards; Word macros, including
converting from WordBasic to VBA; Technical writing and reviewing; Standards
------------------------------------------------
"Dave Rado" <dr...@onetel.net.uk> wrote in message
news:eqcqxJ7#AHA.1236@tkmsftngp07...
I can't find any relating to Word 97 and above ... except one about doc ->
html -> rtf failing to maintain picture sizes but as we're not discussing
html, that one's not relevant.
Regards
Dave
"Howard Kaikow" <kai...@standards.com> wrote in message
news:eGyKs###AHA.1288@tkmsftngp07...
BTW, does RTF also retain things like document properties and
variables?
Andrew
Properties yes, Variables I think no.
--
Please post your response to the newsgroup.
http://www.standards.com/ipusers/standards; Word macros, including
converting from WordBasic to VBA; Technical writing and reviewing; Standards
------------------------------------------------
"Jonathan West" <jw...@mvps.org> wrote in message
news:#YqZtyJ$AHA.1108@tkmsftngp05...
Hi Dave,
I can satisfy your interest <g>
Word 2000;
Run the following macro in an empty document and save as RTF.
The RTF-file will show no trace of the last two accents.
Pretty exotic, but still ... (Suzanne Barnshill brought up these accent marks
a while back; they seem to belong to the far-east support)
ActiveDocument.Paragraphs(1).SpaceBefore = 12
Selection.TypeText "mytest"
ActiveDocument.Characters(1).Font.EmphasisMark = wdEmphasisMarkNone
ActiveDocument.Characters(2).Font.EmphasisMark = wdEmphasisMarkOverComma
ActiveDocument.Characters(3).Font.EmphasisMark = wdEmphasisMarkOverSolidCircle
ActiveDocument.Characters(4).Font.EmphasisMark = wdEmphasisMarkOverWhiteCircle
ActiveDocument.Characters(5).Font.EmphasisMark = wdEmphasisMarkUnderSolidCircle
Greetings, Klaus
Regards
Dave
"Klaus Linke" <fotosatz...@t-online.de> wrote in message
news:OyPkz#M$AHA.1336@tkmsftngp07...
> > How has at worked for you?
>
> Take a look at the following article for an example
Yes Ive already tested it a few months go and still have it.
> >
> > How many documents have you applied this on?
>
> Hundreds
Cool. My program would be doing it on hundreds of files a day.. I am not
sure if this is the route I will take. I am still debating between this
solution or a virus scanning solution.
> > Does this run in an unattended fashion?
>
> Yes
Cool. Thanks again Jonathan
SYMBOL-fields get changed by saving as RTF.
{SYMBOL \a 97 \f "Symbol" \s 20} gets changed to a protected character (with
that I mean a character that behaves as if it had been inserted with
"Insert|Symbol": you can't change its font, and MsgBox AscW(Selection) shows
"40"), and the size gets changed from 20 pt to the size of the preceeding character).
Greetings, Klaus