FileSaveAs Won't Work In Macro

S

Suzanne

I'd like to record a Normal macro (assigned to f13) that selects all
contents of an open document (command-A), copies them (command-C),
creates a new blank document (command-N), pastes the clipboard contents
(command-V), then FileSaveAs (f12) and pause or whatever so I can type
in a name for the new document, click OK (return key). But I'm having
problems.

My previous result:
When the Save dialog pops up and OK (return key) is pressed, the
document is saved with the "suggested" title, which is the maximum
number of allowable characters from the first line of text. However,
when the macro is run on another document, it saves the new document
with the same name as what the macro recorded. No good. Must be able to
type new name in. But the macro need not have to automatically save if
it will make it possible to do this at all. The user can do that. But
I'm trying to streamline as much as possible.

The macro must be saved with the Normal template, which has been
stripped down to a few specific styles, so that the text can be
imported by Quark without any scrambling, garbage styles, etc.

I don't feel confident enough nor have enough time to learn enough VBA
to help me just now.
Can you help?
 
S

Suzanne

Forgot to mention I'm using Word X for Mac. Please help me meet my
Friday afternoon deadline!
 
J

JE McGimpsey

one quick and dirty way:

Public Sub CopyPasteSave()
Selection.WholeStory
Selection.Copy
Documents.Add DocumentType:=wdNewBlankDocument
Selection.PasteAndFormat (wdPasteDefault)
Application.Dialogs(wdDialogFileSaveAs).Show
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top