Document doesn't save the paragraphs inserted with range object

V

vibs

I am adding couple of paragraphs after a page break at the end of the
document using range object, the document is rendered fine, however saving
the document
with either of these options doesn't save the new paragraphs
Me.m_objDoc.Save()
'Me.Application.Documents.Save(NoPrompt:=True)
'Me.Application.Documents(Me.m_objDoc.Name).Save()

If I manually enter something in the document and manually press save
button, then the document is saved correctly. I have put in a lot of time on
this and can't figure out what I am missing. Please help..

Thanks
Vibs
 
D

Doug Robbins - Word MVP

ActiveDocument.Save

From the help file

This example saves open documents that have changed since they were last
saved.

Dim docLoop As Document

For Each docLoop In Documents
If docLoop.Saved = False Then docLoop.Save
Next docLoop
It maybe that you have to save them one by one. At least, I would only ever
be issuing a .Save command in respect of theone document with which I was
working at the time.
--
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
 

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