adobe macro

T

tricia

I use to have the following comand in a macro and it worked fine
Application.Run MacroName:="CreatePDFAndCloseDoc" now with word03 and adobe8
it does not any suggestions/
 
R

Russ

Show us the code for:
CreatePDFAndCloseDoc
Subroutine.
The filenames or paths of the applications may be different.
 
T

tricia

sub BreakIt()
Dim MainDoc As Document, SubDoc As Document, SectionNo%, sPath$

Set MainDoc = ActiveDocument
sPath = MainDoc.Path
If Right(sPath, 1) <> "\" Then sPath = sPath & "\"

For SectionNo = 1 To ActiveDocument.Sections.Count
ActiveDocument.Sections(SectionNo).Range.Copy
Set SubDoc = Application.Documents.Add
SubDoc.Range.Paste
SubDoc.SaveAs sPath & Left(MainDoc.Name, Len(MainDoc.Name) - 4) & _
SectionNo & ".doc"
Application.Run MacroName:="CreatePDFAndCloseDoc"

'


Next SectionNo
Set SubDoc = Nothing
Set MainDoc = Nothing
End Sub
 
R

Russ

Tricia,
I don't see anything wrong will this part of the code. But where is the code
for the macro named "CreatePDFAndCloseDoc"? That is the code I asked you to
post because you said it did not work, now, with the new setup. Could it be
that you didn't transfer that macro from your old setup?
Did you write "CreatePDFAndCloseDoc" or was it part of an Adobe or third
party add-in (plug-in)?

The menu Tools/Templates and Add-Ins... is used for attaching templates and
using add-ins and the organizer button will take you to another dialog for
transferring macros, etc. between files. Can you go back to your old setup
and look at the aforementioned dialogs to see what was being used there?
 
T

tricia

Russ,

I did not write the code for "CreatePDFAndCloseDoc" I copied it into my
macro based on the ICON that was available in Word to convert to Adobe and
close. That ICON is no longer avaialable. I am looking for code I can write
that will do the same thing it did.

Tricia
 
R

Russ

By ICON, do you mean a toolbar button that you clicked on to create a PDF
out of the active document and then close the document? Did you create that
button before or was it placed there by installing Adobe Acrobat? Can you
save a document as a PDF by going through file..save as? If not, then you
may need to (re)install Adobe Acrobat. If you can, then record a macro
saving a file as a PDF and close the file and assign the macro to a new
button in one of your toolbars.
 

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