Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Opening a word document in LotusScript

Status
Not open for further replies.
Oct 3, 2002
1
GB
Hi there,

I am having trouble opening a word document when trying to perform a mail merge using LotusScript. I am wanting the user to enter the file path of the word document.

At present i am using the follwing code:

' create an instance of Word
Dim wrd As Variant
Set wrd = CreateObject("word.application")

wrd.Documents.Open "T:\APLACEME\STD\LETTERS\NOTES.doc"

I have tried getting user input with the following code:

' create an instance of Word
Dim wrd As Variant
Set wrd = CreateObject("word.application")

userinput = Inputbox("Please enter the template filepath. ", db.Title,"C:\''''filepath''''")

wrd.Documents.Open userinput

I know this does not work because 'userinput' is a string without the speech marks.

Can anyone suggest a work around.

Much appreciated

Richard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top