Hey guys i'm having a problem trying to figure out how to resize this metafile image that i'm pasting into word. Here is the code so far. I'm new at this and I'm stuck.
Public Sub Create_Word_Report()
Const wdWindowStateMaximize As Integer = 1
Const wdPrintLayoutView As Integer = 3
Const wdAlignParagraphCenter As Integer = 1
Const wdAnimationShimmer As Integer = 6
Const wdPasteMetafilePicture As Integer = 3
Const wdInLine As Integer = 0
Const wdPageFitFullPage As Integer = 1
Dim WrdDoc As Object
Dim Wrksht As Workbook
Dim Sht As Worksheet
Set WrdApp = CreateObject("Word.Application")
With WrdApp
.Visible = True
.WindowState = wdWindowStateMaximize
.Documents.Add
Set WrdDoc = .ActiveDocument
End With
WrdDoc.ActiveWindow.View = wdPrintLayoutView
Set Wrksht = ActiveWorkbook
For Each Sht In Wrksht.Worksheets
Sht.Activate
If Range("E3") <> Empty Then
Sht.Range("A1:H65").Copy
With WrdApp.Selection
.ParagraphFormat.Alignment = wdAlignParagraphCenter
.MoveRight
.PasteSpecial Link:=False, _
DataType:=wdPasteMetafilePicture, _
Placement:=wdInLine, _
DisplayAsIcon:=False
.ParagraphFormat.Alignment = wdAlignParagraphCenter
.InsertBreak Type:=wdPageBreak
End With
End If
Next
End Sub
Public Sub Create_Word_Report()
Const wdWindowStateMaximize As Integer = 1
Const wdPrintLayoutView As Integer = 3
Const wdAlignParagraphCenter As Integer = 1
Const wdAnimationShimmer As Integer = 6
Const wdPasteMetafilePicture As Integer = 3
Const wdInLine As Integer = 0
Const wdPageFitFullPage As Integer = 1
Dim WrdDoc As Object
Dim Wrksht As Workbook
Dim Sht As Worksheet
Set WrdApp = CreateObject("Word.Application")
With WrdApp
.Visible = True
.WindowState = wdWindowStateMaximize
.Documents.Add
Set WrdDoc = .ActiveDocument
End With
WrdDoc.ActiveWindow.View = wdPrintLayoutView
Set Wrksht = ActiveWorkbook
For Each Sht In Wrksht.Worksheets
Sht.Activate
If Range("E3") <> Empty Then
Sht.Range("A1:H65").Copy
With WrdApp.Selection
.ParagraphFormat.Alignment = wdAlignParagraphCenter
.MoveRight
.PasteSpecial Link:=False, _
DataType:=wdPasteMetafilePicture, _
Placement:=wdInLine, _
DisplayAsIcon:=False
.ParagraphFormat.Alignment = wdAlignParagraphCenter
.InsertBreak Type:=wdPageBreak
End With
End If
Next
End Sub