hey all,
I was wondering if someone can point me in the right direction with this one. I'm trying to resize an enhancedmetafile after using Word.Application...PasteSpecial. Basically the image is too long, and it extends past the boundaries of the word document page. I'm having a hard time finding the right commands to do this. Also, is there an alternate DataType:= that I can use that will not allow values within the image to be changed after it is pasted into Word? I found out that the enhancedmetafile image allows people to go into the image and change it.
Below is what I have so far. The last area that was commented out was my last attempt to resize this image.
Option Explicit
Sub Export_A1_CGI_Click()
Dim oRange As Word.Range
Dim objWdApp As Word.Application
Dim objWdDoc As Word.Document
Dim objWdRange As Word.Range
Dim B1CGI4 As Object
Set objWdApp = New Word.Application
objWdApp.Visible = True
Set objWdDoc = objWdApp.Documents.Add
Set objWdRange = objWdDoc.Content
Application.ScreenUpdating = False
Sheet4.Select
Sheet4.Range(Cells(6, 21), Cells(67, 27)).Copy
With objWdApp.Selection.PageSetup
.TopMargin = objWdApp.InchesToPoints(0.5)
.BottomMargin = objWdApp.InchesToPoints(0.5)
End With
objWdDoc.ActiveWindow.Selection.PasteSpecial DataType:=wdPasteEnhancedMetafile, Placement:=wdInLine
'Set B1CGI4 = ActiveWindow.Selection
'With B1CGI4.ShapeRange(1)
'.LockAspectRatio = True
'.Top = 70
'.Left = 10
'.Width = 700
'End With
End Sub
I'd appreciate any help with this one.
Thanks!
Bookmarks