Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 07-17-2011, 10:11 AM
Jaymond Flurrie Jaymond Flurrie is offline Clear document Windows 7 64bit Clear document Office 2010 32bit
Novice
Clear document
 
Join Date: Feb 2011
Posts: 13
Jaymond Flurrie is on a distinguished road
Default

I tried that later part, just by pasting a link:

Code:
With appWD.Selection
        .MoveRight Unit:=wdCharacter, Count:=1
        .TypeText Text:="Left part of header"
        .ParagraphFormat.Alignment = wdAlignParagraphLeft
        .TypeText Text:=vbTab & vbTab & "right part of header"
        DocWD.Parent.ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
    
        strChartName = "A. header"
        shtCharts.Shapes(strChartName).Copy
        .TypeText Text:=vbTab & vbTab & vbTab & vbTab & strChartName & vbCrLf
        .Font.Bold = wdToggle
        .PasteSpecial Link:=False, DataType:=wdPasteMetafilePicture, Placement:=wdInLine, DisplayAsIcon:=False
        .InsertBreak Type:=wdPageBreak
        
        strChartName = "B. header"
        shtCharts.Shapes(strChartName).Copy
        .TypeText Text:=vbTab & vbTab & vbTab & vbTab & strChartName & vbCrLf
        .Font.Bold = wdToggle
        .PasteSpecial Link:=True, DataType:=wdPasteMetafilePicture, Placement:=wdInLine, DisplayAsIcon:=False
        .InsertBreak Type:=wdPageBreak
    End With
That first paste doesn't work, the next works fine. The error it gives is Run-time error '5342': The specified datatype is unavailable. Seems to me something is wrong with using that wdPasteMetafilePicture, but what?
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
Trying to clear the background colour from a theme ezekiel181 Word 1 11-14-2010 07:29 AM
Search and Replace - Clear Search box JostClan Word 1 05-04-2010 08:46 PM
command clear forms dmcohio Word 0 04-08-2010 11:11 AM
'Clear formatting' issue phoebs47 Word 0 03-16-2010 06:55 AM
Holidays--clear all? markg2 Outlook 0 11-01-2009 05:57 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:51 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft