(Solved) – Trying to print a word document as a coversheet

(solved)-–-trying-to-print-a-word-document-as-a-coversheet

I am trying to add word document cover sheet to a quote i am printing from Excel

This is what I have tried, but i can see that it is flawed in trying to uses objects in an Array

Is there a way to do this?
The end result I want:
Print the current selection of the Excel Sheet, with the Word Doc as a cover sheet, into 1 PDF file

Sub PrintQuoteCover()

Set WordApp = Nothing 'release the memory

Dim objWord As Object
Dim objDoc As Object
Dim CSELECT As Range

    Set CSELECT = Selection
    Set objWord = CreateObject("Word.Application")
    objWord.Visible = False
    Set objDoc = objWord.Documents.Open("O:12.Product InfoQUOTE COVER MARKETING.docx")

Dim ARRAYONE As Variant
ARRAYONE = Array(objDoc, CSELECT)
ARRAYONE.Select
    Selection.ExportAsFixedFormat Type:=xlTypePDF, Filename:="O:1.To Quote" & FileName1, Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False

Set WordApp = Nothing 'release the memory
End Sub


I appreciate any suggestions!

Leave a Reply

Your email address will not be published. Required fields are marked *