Re: AutoNew or AttachAs "name??" to create file name from data
- From: "Doug Robbins - Word MVP" <dkr@xxxxxxxxxxxxxxxxxx>
- Date: Thu, 25 Jun 2009 08:31:27 +1000
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.
.
- Follow-Ups:
- References:
- AutoNew or AttachAs "name??" to create file name from data
- From: JBark
- Re: AutoNew or AttachAs "name??" to create file name from data
- From: Doug Robbins - Word MVP
- Re: AutoNew or AttachAs "name??" to create file name from data
- From: JBark
- Re: AutoNew or AttachAs "name??" to create file name from data
- From: Doug Robbins - Word MVP
- Re: AutoNew or AttachAs "name??" to create file name from data
- From: JBark
- Re: AutoNew or AttachAs "name??" to create file name from data
- From: Doug Robbins - Word MVP
- Re: AutoNew or AttachAs "name??" to create file name from data
- From: JBark
- AutoNew or AttachAs "name??" to create file name from data
- Prev by Date: Re: accessing word 2003 properties from word 2007 causes error
- Next by Date: Re: Insert text here-field (Macrobutton nomacro) dissapears after
- Previous by thread: Re: AutoNew or AttachAs "name??" to create file name from data
- Next by thread: Re: AutoNew or AttachAs "name??" to create file name from data
- Index(es):
Loading