Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > VBA / Office Integration > Word, PowerPoint, Outlook, and Other Office Products > Pass variable from word to VB


Reply
 
Thread Tools Display Modes
  #1  
Old 09-26-2002, 08:40 AM
pells2 pells2 is offline
Freshman
 
Join Date: Apr 2002
Location: Massachusetts
Posts: 35
Default Pass variable from word to VB


I have a word document and in it there is a button that runs a VB program that grabs attachments and creates a basic e-mail including the word document.

My problem is the program needs to check and make sure the word document is saved and not still the template. Second it needs to check the folder where the document is saved to see if there is a valid .pdf to also attach.

I can make this real simple, the first 9 characters of the saved word name is the folder name. So I just need a way to pass the word file name to my vb program at execution. Once I get it in VB I can do all the manapulation to the string to get the folder name.

Hope this makes sense, thanks.
Reply With Quote
  #2  
Old 09-26-2002, 09:11 AM
Wamphyri's Avatar
Wamphyri Wamphyri is offline
Variable not defined

Retired Moderator
* Guru *
 
Join Date: Apr 2002
Location: Ottawa, Ontario
Posts: 4,793
Default

You can use the Path property to get the path and the Saved property to see if it has been saved since changes were made
Code:
YourPath = ActiveDocument.Path IsSaved = ActiveDocument.Saved
__________________
-Carl
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->