Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Macro Button
I have a word doc that I'm using as a template with MS Access. I've build a
macro in the word doc that locates a specific line of text, positions down one line and then inserts an excel spreadsheet into it. The directory where the excel spreadsheet exists varries from user to user. I need a way to dynamically set the path to the excel spreadsheet via VBA in a word macro. In MS Access I can use CURRENTPROJECT.PATH to get a system variable for the current project path. Is there a similar VBA variable in Word? Thanks in advance for your help! |
#2
|
|||
|
|||
Hi ?B?UGV0ZXJN?=,
I have a word doc that I'm using as a template with MS Access. I've build a macro in the word doc that locates a specific line of text, positions down one line and then inserts an excel spreadsheet into it. The directory where the excel spreadsheet exists varries from user to user. I need a way to dynamically set the path to the excel spreadsheet via VBA in a word macro. In MS Access I can use CURRENTPROJECT.PATH to get a system variable for the current project path. Is there a similar VBA variable in Word? Best place to get a quick answer to a VBA question is one of the word.vba newsgroups... Yes, Word does have equivalents. I'm not 100% clear on what you mean by "project": whether you mean the document, itself, or a template. Assuming the document, this will work: ActiveDocument.Path Cindy Meister INTER-Solutions, Switzerland http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004) http://www.word.mvps.org This reply is posted in the Newsgroup; please post any follow question or reply in the newsgroup and not by e-mail :-) |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Getting Spell Check Macro to work | Microsoft Word Help | |||
paste options button no longer visible | Microsoft Word Help | |||
How do I get the 'CreatepPDF' button on the Word 2003 display? | Microsoft Word Help | |||
Save As is not working due to macro security settings | Microsoft Word Help | |||
macro help | Microsoft Word Help |