Consulting

Results 21 to 34 of 34

Thread: Excel VBA invokes Word

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #30
    MS Excel MVP VBAX Tutor
    Joined
    Mar 2005
    Posts
    246
    Location
    Why do you need "wrdApp.Application.PrintOut"? Isn't wrdApp the Word Application?

    From the bottom of the Object Browser:
    Sub SaveAs([FileName], [FileFormat], [LockComments], [Password], [AddToRecentFiles], [WritePassword], [ReadOnlyRecommended], [EmbedTrueTypeFonts], [SaveNativePictureFormat], [SaveFormsData], [SaveAsAOCELetter], [Encoding], [InsertLineBreaks], [AllowSubstitutions], [LineEnding], [AddBiDiMarks])

    It's pretty much optional, so replace
    ChangeFileOpenDirectory (docPath) 
    ActiveDocument.SaveAs FileName:=docName, FileFormat:= wdFormatDocument, LockComments:=False, Password:="", AddToRecentFiles:= _ 
    True, WritePassword:="", ReadOnlyRecommended:=False, EmbedTrueTypeFonts:= False, SaveNativePictureFormat:=False, SaveFormsData:=False, _ 
    SaveAsAOCELetter:=False
    with this

    wrdApp.ActiveDocument.SaveAs FullName
    where FullName is the path and file name where the document is to be saved.
    Last edited by Aussiebear; 04-02-2025 at 04:59 AM.
    - Jon
    -------
    Jon Peltier, Microsoft Excel MVP
    Peltier Technical Services
    Tutorials and Custom Solutions
    http://PeltierTech.com
    _______

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •