Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.tables
musicgold via OfficeKB.com musicgold via OfficeKB.com is offline
external usenet poster
 
Posts: 1
Default Manual update for 'Excel to Word' table

Hi,

I am trying to create a macro to copy an Excel table into a Word document.
The macro need to perform the following three steps. I am stuck with the
third step. It is also not possible to record a macro for this step. Can you
please help me with that?

1. Paste the Excel table in the clipboard at the cursor location in the word
document. (Pastespecial)
2. Format the table
3. Change the update option to €˜Manual Update ( this can be done manually as
follows: Edit -- links-- Manual Update )

My code:

Code:
...

Selection.PasteSpecial Link:=True, DataType:=wdPasteHTML    '  paste table
into Word

Dim tbl As Table

For Each tbl In Selection.Tables
  
  tbl.Rows.HeightRule = wdRowHeightAuto
  tbl.Rows.Height = InchesToPoints(0)                 ' format the table
  tbl.AutoFitBehavior (wdAutoFitWindow)
  
  Next tbl

--------------------------------------------- €˜ the part after this is not
working.
Dim alf As Shape
For Each alf In ActiveDocument.Shapes
If alf.Type = msoLinkedOLEObject Then
alf.LinkFormat.AutoUpdate = False
End If
Next
Thanks,

MG.

--
Message posted via http://www.officekb.com

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Table Properties get lost with Excel link update Jason Tables 1 May 28th 08 05:16 PM
How do I update a TOC with manual field codes? SAL Microsoft Word Help 2 April 21st 06 05:07 PM
Update Excel table in Word automatically from data in Excel yvonnedemulder Tables 1 December 6th 05 06:49 PM
Update Excel table in Word automatically from data in Excel yvonnedemulder Microsoft Word Help 4 December 6th 05 06:49 PM
Linked excel table loses borders on update Gary McGill Tables 2 March 27th 05 10:27 AM


All times are GMT +1. The time now is 01:20 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"