Inquiridor
Unescpected gray thin lines appear when an image is pasted from Excel to Powerpoint

Pergunta
-
Guys,
I have a problem with the .CopyPicture and .PasteSpecial.
When the macro pastes the picture, a gray and thin border appears with the image.
I'm copying many Excel objects and images, but it appears just in the chart image into Powerpoint, and I cannot crop the image because the other objects.
Sample code below:
Sub GerarSlides()
Application.ScreenUpdating = FalseDim objPPT As Object
Dim grafico(3) As String
Dim intSlide, cont As Integer
Dim nomearquivo, desktoppath As String
Dim objPres As Object
grafico(1) = "P0 e P1"
grafico(2) = "P2"
grafico(3) = "P3"Set objPPT = CreateObject("Powerpoint.application")
objPPT.Visible = TrueSet objPres = objPPT.Presentations.Add
objPres.Slides.Add 1, 1 'ou use ppLayoutTextobjPPT.ActiveWindow.ViewType = 1
ActiveWindow.DisplayGridlines = FalseFor cont = 1 To 3
Plan4.Cells(2, 3) = grafico(cont)
Plan2.Range("A1", Plan2.UsedRange).Borders.LineStyle = xlNone 'it doesn't workPlan2.Range("A1", Plan2.UsedRange).BorderAround (xlLineStlyeNone)
Plan2.Range("A1", Plan2.UsedRange).CopyPicture Appearance:=xlScreen, Format:=xlPictureobjPPT.ActiveWindow.View.PasteSpecial
Next cont
Application.ScreenUpdating = True
End SubSo please, I need help for this threat, to remove the gray thin lines.
Best Regards,
Ricardo
- Editado Ricardo Dezan quarta-feira, 5 de fevereiro de 2014 17:35
Todas as Respostas
-
Bem vindo ao fórum.
Aqui você pode perguntar em português.
Sobre sua dúvida, verifique o link a seguir: http://www.pptfaq.com/FAQ01066_Inserted_images_have_an_unwanted_border_or_lines_on_one_or_more_sides.htm
Se não for útil, volte a postar.
Felipe Costa Gualberto - http://www.ambienteoffice.com.br
-
Felipe, bom dia.
Tentei aplicar o proposto no link que vc indicou mas não obtive sucesso. A linha continuou lá.
Obrigado pela ajuda. Se souber de mais alguma alternativa.
Não há algum parâmetro para PasteSpecial como uma tentativa?
Obrigado.
-
-