|
-
Aug 27th, 2000, 03:36 PM
#1
Thread Starter
Frenzied Member
hi, here is what iam trying to do
i want to press a button and automatically save a file in word...... (vb
sends a ID and when the word file is saved, the filename is that ID that vb
sends in.. is this possible?)
and i wanna overwright if that file exists alread..
any help would be greatly appreciated
-
Aug 28th, 2000, 11:36 AM
#2
Addicted Member
I believe this is close to what you want:
Dim WordApp As Word.Application
Kill "Path and Filename"
'Starting Word
Set WordApp = New Word.Application
WordApp.Application.Visible = False
'Open file
WordApp.Documents.Open "Path and Filename"
'Save to path and filename
WordApp.ActiveDocument.SaveAs "Path and Filename", wdFormatDocument
WordApp.Documents.Close wdDoNotSaveChanges
WordApp.Application.Quit
Set WordApp = Nothing
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|