Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel to Word

I am trying to build code that would create reports from excel base
calculations. I have a standard format of the report whereby onl
numbers have to be posted to it.

Sub RunXL()
Dim myWB As Excel.Workbook
Set myWB = GetObject("C:\Temp\XLtoWrd.xls")
Selection.GoTo _
what:=wdGoToBookmark, _
Name:="Amt"
Selection.TypeText (myWB.Sheets("Sheet1").Range("Amt"))
Selection.GoTo _
what:=wdGoToBookmark, _
Name:="Dys"
Selection.TypeText (myWB.Sheets("Sheet1").Range("Over"))
Set myWB = Nothing
End Sub

My question is how can I allow for file browsing in the code? I don'
want to keep sending my final excel files to the temp directory. I'v
tried using GetOpenFilename, but I get a "Method or data member no
found" error.

A follow up to this question is about the bookmarks. I want a specifi
bookmark shown in several areas, but Word just moves it. For instance
in the example above, I want "Amt" shown on three separate pages, bu
Word only allows for the most recent bookmark assignment I gave it. I
there a way to go about this?

Thanks

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel to Word

Never mind about the first part. I inserted the follwoing code and i
worked:

Dim FName As Variant
FName = Excel.Application.GetOpenFilename("Excel File (*.xls),*.xls")
Set myWB = GetObject(FName)

I'm still lost with the bookmark stuff, so any help will be greatl
appreciated.

Thanks

--
Message posted from http://www.ExcelForum.com

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel to Word

Also I just wanted to mention that I have thought about mail merge. Th
report I want merged utilizes all the columns in excel, and I'll need a
least 50 more :-

--
Message posted from http://www.ExcelForum.com

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 599
Default Excel to Word

Curare

A follow up to this question is about the bookmarks. I want a specific
bookmark shown in several areas, but Word just moves it. For instance,
in the example above, I want "Amt" shown on three separate pages, but
Word only allows for the most recent bookmark assignment I gave it. Is
there a way to go about this?


That question may be better asked in a Word newsgroup. I'll bet they tell
you that you can't have two bookmarks with the same name, but I'm just
guessing.

If you're interested, here's a post about going the other way, that is, from
Excel to Word.

http://www.dicks-blog.com/excel/2004...ting_word.html


--
Dick Kusleika
MVP - Excel
Excel Blog - Daily Dose of Excel
www.dicks-blog.com


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel to Word

Thanks. I think you're right, there's no way to have multipl
bookmarks. I guess I could differentiate using nomenclature e.g. Amt
Amt1, Amt2,...

--
Message posted from http://www.ExcelForum.com

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need Excel count of 1 word if found in multi-word cells of column Function_Challenged Excel Worksheet Functions 1 August 27th 09 12:08 AM
excel object linked to word will not add sums in word Robin Excel Discussion (Misc queries) 0 March 31st 09 11:10 PM
Excel 7, paste linked to word becomes black when word pdf'd Surffreak Excel Discussion (Misc queries) 0 June 1st 08 12:17 AM
Copy from Word to Excel, and retain indent, plus word wrap Eric Excel Discussion (Misc queries) 1 March 9th 07 03:15 AM
Print labels by using Excel data in a Word mail into word Zoey Excel Discussion (Misc queries) 1 November 1st 05 09:08 PM


All times are GMT +1. The time now is 06:14 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"