Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.word.vba.general,microsoft.public.excel.programming,microsoft.public.excel.misc,microsoft.public.word.vba.userforms
|
|||
|
|||
![]()
I tried writing code to add \*MERGEFORMAT with the previous VBA syntex
you wrote me, but it would not work. I kept getting a run-time error '450': wrong number of arguments or invalid property assignment. I get this error even when I change rng to Wdoc.Application.Selection, where Wdoc = Wapp.ActiveDocument. Or when I add preserveformat = true. This is the code I wrote: rng.Fields.Add Range:=Selection.Range, Type:=xlWorksheet, _ Text:="LINK Excel.Sheet.8 C:\\Documents and Settings\\shornbec\\Desktop\\sarah\\excel templates\\Mission.FY07Q1_Sarah.xls MissionTimelineDeltaVBudgetTable \a \f 4 \h \*MERGEFORMAT" The Type argument is wrong; you don't need it since the LINK field name is specified in the text. Remove it completely or use wdApp.wdFieldEmpty (where wdApp is whatever variable name you're using for the Word.Application). And put a space between \* and Mergeformat. You'll probably also need to put the path in 'single quotes' since it contains spaces. Cindy Meister INTER-Solutions, Switzerland http://homepage.swissonline.ch/cindymeister (last update Jun 17 2005) http://www.word.mvps.org This reply is posted in the Newsgroup; please post any follow question or reply in the newsgroup and not by e-mail :-) |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Create a Word Table from a Excel Macro | Excel Discussion (Misc queries) | |||
Macro to Extract Text From Word Table Into Excel? | Excel Discussion (Misc queries) | |||
Paste Table from Word in Excel - 2000 -vs- 2002 | Excel Discussion (Misc queries) | |||
Extract MS Excel Data embedded in MS Word | Excel Discussion (Misc queries) | |||
TRYING TO SET UP EXCEL SPREADSHEET ON MY COMPUTER | New Users to Excel |