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


Say I have the following code in excel to open a word doc:


Code
-------------------

Sub inputtext()

Set wrd = GetObject(, "Word.Application")

wrd.ChangeFileOpenDirectory _
"\\BTBEAPDAT01\DATA_BEACON_HOUSE\NCC\Tier3 RP\RP Word Temps\"
wrd.Documents.Open FileName:="RPNB01", _
ReadOnly:=True, AddToRecentFiles:=False
wrd.Selection.TypeText Text:="01"
wrd.Selection.Range.InsertAutoText
wrd.Selection.TypeText Text:="02"
wrd.Selection.Range.InsertAutoText
wrd.Selection.TypeText Text:="05"
wrd.Selection.Range.InsertAutoText
End Sub

-------------------


so the word doc opens and it will insert the autotext entry called '01
which will then prompt the user for some info (eg addressee
addressline1, ....) then once done it will insert the autotext entr
'02' which will then prompt the user for more info.

If the info needed for the autotext prompts all exists on excel, i
there a way to add this into the code?

many thank

--
rocket061
-----------------------------------------------------------------------
rocket0612's Profile: http://www.excelforum.com/member.php...fo&userid=1949
View this thread: http://www.excelforum.com/showthread.php?threadid=55094

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
AutoText Nathalija Puh Excel Discussion (Misc queries) 1 April 17th 09 04:00 PM
AutoText Dan Excel Worksheet Functions 3 March 10th 08 11:16 PM
can WP autotext be used in a spreadsheet chiefiofirengineerio Setting up and Configuration of Excel 1 January 11th 07 12:33 AM
Autotext in Excel Sue Excel Discussion (Misc queries) 1 March 28th 06 04:46 PM
Autotext in comment Bryan Excel Discussion (Misc queries) 2 December 30th 04 04:44 PM


All times are GMT +1. The time now is 12:02 PM.

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

About Us

"It's about Microsoft Excel"