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

I have an Excel book that opens a word document and adds some
information from Excel. I want the user to be prompted for a save
location. The program uses a template word file that I don't want
people saving over. I want them to saveas to their own location.
The Dim's I'm using
Dim wrdApp As Word.Application 'creates a dialog with Word
Dim wrdDoc As Word.Document 'creates a dialog with a document
Set wrdApp = CreateObject("Word.Application")
wrdApp.Visible = True 'show the document
wrdApp.Activate
Set wrdDoc = wrdApp.Documents.Open("Z:\COMMON FILES\Encroachment
Permits\Permit.Tracker\FormLetters\PreAppDeficienc yLetter.doc")
wrdDoc.SaveAs or wrdDoc.Save just saves over the current document. I
want the saveto location window to come up. I don't know if this can
be automated through Excel or what. One caveat...users are on
different drive letters. So I can't just default to the C: drive.
Some might save their project documents on the J: drive in a
different
folder. The location is always different.
Any ideas? Thanks in advance.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 703
Default Prompt saveas location in Word from Excel

Hi

I would save the template as true 'Document Template' (save as
document file type in word). Then you can use this:

Set wrdDoc = wrdApp.Documents.Add Template:="Z:\COMMON FILES
\Encroachment
Permits\Permit.Tracker\FormLetters\PreAppDeficienc yLetter.dot"

Hopes this helps.
....
Per


On 28 Okt., 22:07, gab1972 wrote:
I have an Excel book that opens a word document and adds some
information from Excel. *I want the user to be prompted for a save
location. *The program uses a template word file that I don't want
people saving over. *I want them to saveas to their own location.
The Dim's I'm using
Dim wrdApp As Word.Application *'creates a dialog with Word
Dim wrdDoc As Word.Document * * 'creates a dialog with a document
Set wrdApp = CreateObject("Word.Application")
wrdApp.Visible = True * 'show the document
wrdApp.Activate
Set wrdDoc = wrdApp.Documents.Open("Z:\COMMON FILES\Encroachment
Permits\Permit.Tracker\FormLetters\PreAppDeficienc yLetter.doc")
wrdDoc.SaveAs or wrdDoc.Save just saves over the current document. *I
want the saveto location window to come up. *I don't know if this can
be automated through Excel or what. *One caveat...users are on
different drive letters. *So I can't just default to the C: drive.
Some might save their project documents on the J: drive in a
different
folder. *The location is always different.
Any ideas? *Thanks in advance.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default Prompt saveas location in Word from Excel

O. M. G.!! you are my new best friend! You have saved me TONS of
future headaches. I REALLY appreciate this.

Made a slight fix to your coding though - fyi
Set wrdDoc = wrdApp.Documents.Add(Template:="Z:\COMMON FILES
\Encroachment Permits\Permit.Tracker\FormLetters
\PreAppDeficiencyLetter.dot")

Needed ()'s after .Add

Thanks a gajillion nevertheless!

Per Jessen wrote:
Hi

I would save the template as true 'Document Template' (save as
document file type in word). Then you can use this:

Set wrdDoc = wrdApp.Documents.Add Template:="Z:\COMMON FILES
\Encroachment
Permits\Permit.Tracker\FormLetters\PreAppDeficienc yLetter.dot"

Hopes this helps.
...
Per


On 28 Okt., 22:07, gab1972 wrote:
I have an Excel book that opens a word document and adds some
information from Excel. *I want the user to be prompted for a save
location. *The program uses a template word file that I don't want
people saving over. *I want them to saveas to their own location.
The Dim's I'm using
Dim wrdApp As Word.Application *'creates a dialog with Word
Dim wrdDoc As Word.Document * * 'creates a dialog with a document
Set wrdApp = CreateObject("Word.Application")
wrdApp.Visible = True * 'show the document
wrdApp.Activate
Set wrdDoc = wrdApp.Documents.Open("Z:\COMMON FILES\Encroachment
Permits\Permit.Tracker\FormLetters\PreAppDeficienc yLetter.doc")
wrdDoc.SaveAs or wrdDoc.Save just saves over the current document. *I
want the saveto location window to come up. *I don't know if this can
be automated through Excel or what. *One caveat...users are on
different drive letters. *So I can't just default to the C: drive.
Some might save their project documents on the J: drive in a
different
folder. *The location is always different.
Any ideas? *Thanks in advance.

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
Prompt for a saveas location in Word from Excel gab1972 Excel Programming 0 October 15th 09 06:00 PM
have excel prompt for a file name and save location Dave F Excel Discussion (Misc queries) 6 March 20th 07 06:35 PM
Help with SaveAs prompt juggler Excel Programming 3 January 3rd 06 08:27 PM
Unexpected SaveAs prompt for workbooks with pivot tables KentL Excel Programming 0 October 7th 05 10:38 PM
SaveAs without prompt Steven K0 Excel Programming 2 September 17th 04 02:34 AM


All times are GMT +1. The time now is 12:25 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"