ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Use Word VBA string in Excel macro? (https://www.excelbanter.com/excel-programming/287608-use-word-vba-string-excel-macro.html)

Ed[_9_]

Use Word VBA string in Excel macro?
 
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



pikus

Use Word VBA string in Excel macro?
 
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

--
Message posted from http://www.ExcelForum.com


Ed[_9_]

Use Word VBA string in Excel macro?
 
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

"pikus " wrote in message
...
It's very easy. From the Main Menu go to Insert--Hyperlink and the
window you need will appear. It should be pretty intuitive from there.
- Pikus


---
Message posted from http://www.ExcelForum.com/





All times are GMT +1. The time now is 09:43 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com