Opening a Word97 doc as a copy with no doc title 
Author Message
 Opening a Word97 doc as a copy with no doc title

I have a Word97 doc, and I want to open a copy of it with no title, just
like what would happen if I were to copy the doc, and paste it into a new
doc. Using the Word object is still very confusing for me.


Sun, 14 Jul 2002 03:00:00 GMT  
 Opening a Word97 doc as a copy with no doc title
This is simply what you have said in your message in VBA "speak". You
will have to trigger the function in some way and change the document
name in the open procedure (tmp.log is a tex log on my machine). Hope
this helps.

Sub temp()
' Open source document.
    Documents.Open ("d:\tmp.log")
' Select contents and copy.
    ActiveDocument.Select
    Selection.Copy
' Ensure we don't save our un-edited source documet, and close it.
    ActiveDocument.Saved = True
    ActiveDocument.Close
' Create a new document based on Normal.dot template.
    Documents.Add "Normal.dot"
' Paste in our original document.
    Selection.Paste
End Sub

Paul.Z.



Quote:
>I have a Word97 doc, and I want to open a copy of it with no title, just
>like what would happen if I were to copy the doc, and paste it into a new
>doc. Using the Word object is still very confusing for me.



Mon, 15 Jul 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Auto close open doc when opening another doc

2. Copy from doc to doc with vb6

3. Open word 97 doc with doc name as variable

4. Open a doc, grab a range without having the whole doc being tabled

5. Opening a Word doc & Copying files

6. Help extracting OLE objects from Word97 Doc

7. Renumber steps in Word97 template doc

8. How to convert doc (word97) to HTML from VB application

9. Inserting DOC files into Word97 document

10. Fields don't print when viewing a word97 doc through IE

11. Auto Download of doc files into new doc file from a web site

12. Saving a doc with name from doc text

 

 
Powered by phpBB® Forum Software