Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Conversions / December 2003

Tip: Looking for answers? Try searching our database.

Open rtf read only cannot close without save

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
www.cdxp.com - 27 Dec 2003 08:00 GMT
I am trying to create a VBA routine to open .doc documents
read only. In testing on my PC everything works ok except
for two docs created by microsoft !. Debugref.doc and
debug.doc which are part of the visual studio collection.
These have a doc extension but in the properties say they
are RTF. When i try and close these documents under VBA  
they insist on bringing up a "save as" box even though
they are opened read only. I have tried setting "saved=
true" but still the same problem. I think it may be a bug
in word 2003 because sometimes manaully i can save them
without the box and sometimes cant. I dont care about
these two docs but am worried that when i roll out i will
see the same problem with other docs. I have created other
RTF docs and they seem to open OK.

So 2 questions

Is there a way to open RTF docs read only without the save
as box. ?

Is there a way to compare all properties between two
documents so i can see what the difference is ?
Doug Robbins - Word MVP - DELETE UPPERCASE CHARACTERS FROM EMAIL ADDRESS - 27 Dec 2003 09:46 GMT
What command are you using to close the documents?

[DocumentObject].Close wdDoNotSaveChanges

should close a document without prompting for it to be saved.

Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested.  Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
> I am trying to create a VBA routine to open .doc documents
> read only. In testing on my PC everything works ok except
[quoted text clipped - 18 lines]
> Is there a way to compare all properties between two
> documents so i can see what the difference is ?
cdxp - 28 Dec 2003 04:50 GMT
Thank you this worked. I had assumed do not save was a
requirement of read only.

For others looking this is the actual string in VB

doc.close(Word.WdSaveOptions.wdDoNotSaveChanges)

>-----Original Message-----
>What command are you using to close the documents?
[quoted text clipped - 33 lines]
>
>.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.