Use Word VBA string in Excel macro?

E

Ed

I write reports in Word and save them using a Word VBA macro, which pulls
certain bits of info from the doc and puts them together in a string to
specify file path and name.

Then I need to put a hyperlink to that doc on my worksheet. How easy would
it be to use the Word file path/name string as my hyperlink string in Excel?
(I'm trying to save having to navigate through folders to the doc each time
I use Ctrl+K. Also, the path link is long and always truncated in the
dialog box, so I have to manually massage each one. A string in a macro
seems easier.)

Ed
 
P

pikus

It’s very easy. From the Main Menu go to Insert-->Hyperlink and th
window you need will appear. It should be pretty intuitive from there
- Piku
 
E

Ed

That's basically what I'm doing now - except I use the keyboard shortcut
(Ctrl+K). I am not having problems getting the hyperlink into the
spreadsheet, except I have to use the whole document path and name, and it's
so long it truncates in the dialog box window, and I have to add in the
missing info every time. I have 89 more to do today.

Since I create the string I would use for this in Word when I save the doc
via Word macro, I'm wondering if there's a way I can get that string to
migrate from Word VBA to Excel VBA and use it in an Excel macro to
programmatically insert the hyperlink.

Ed
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top