Re: AutoNew or AttachAs "name??" to create file name from data
- From: "Doug Robbins - Word MVP" <dkr@xxxxxxxxxxxxxxxxxx>
- Date: Fri, 26 Jun 2009 07:37:12 +1000
Please do not post the same problem to two different newsgroups.
--
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:C81E8C6A-ADC8-4AB0-ABBD-97B9C21CADE6@xxxxxxxxxxxxxxxx
It tells me the full path name of the saved file - which is a good thing. At
least I know the full path is being stored. I've also had a conversation with
Jay about this and he is convinced the code will not execute to kill the file
because the macro is tied to the document and once the document is closed,
the code stops executing so the kill statement nevers gets read. (Which I
understand) He suggested I assign the macro to a custom toolbar and I did but
then the macro will not run at all. If I click the toolbar button, I get a
blank message box and all it says is Microsoft Visual Basic with a red circle
x.
"Doug Robbins - Word MVP" wrote:
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
- 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: auto populate a field based on values in other fields
- Next by Date: Re: word 2007 wordbasic calls fail
- 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):
Relevant Pages
|