Re: AutoNew or AttachAs "name??" to create file name from data




If you replace the following part of your code

Dim Doc As Document
Dim DocPathName As String
Set Doc = ActiveDocument
DocPathName = Doc.FullName
Doc.Close wdDoNotSaveChanges
Kill DocPathName

with

Dim Doc As Document
Dim DocPathName As String
Set Doc = ActiveDocument
DocPathName = Doc.FullName
MsgBox DocPathName

what does the message box display?

--
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, originally posted via msnews.microsoft.com
"JBark" <JBark@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:DBF9218F-D3AA-460B-A83F-7F08BBADFE6D@xxxxxxxxxxxxxxxx
I guess I just don't know enough as to how to sequence everything together
properly so that the full file name with its path will be remembered so it
can be deleted when the kill statement is executed.

"Doug Robbins - Word MVP" wrote:

Here is what the VBA Help file says on it:

Kill Statement

Deletes files from a disk.

Syntax

Kill pathname

The required pathname argument is a string expression that specifies one or
more file names to be deleted. The pathname may include the directory or
folder, and the drive.

Remarks

In Microsoft Windows, Kill supports the use of multiple-character (*) and
single-character (?) wildcards to specify multiple files. However, on the
Macintosh, these characters are treated as valid file name characters and
can't be used as wildcards to specify multiple files.



--
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, originally posted via msnews.microsoft.com
"JBark" <JBark@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:1106529F-E7ED-43E2-A369-DB40865FE3A9@xxxxxxxxxxxxxxxx
> All I really need to know at this point is how I can get the kill > command
> to
> work with the .display mode instead of the .send mode. Is it possible? > I
> really appreciate your feedback. Thanks.



.


Loading