Thank you for being a valued part of the CNET community. As of December 1, 2020, the forums are in read-only format. In early 2021, CNET Forums will no longer be available. We are grateful for the participation and advice you have provided to one another over the years.

Thanks,

CNET Support

General discussion

Auto hyperlinking to another document on close of .doc?

Apr 18, 2007 12:47AM PDT

I have a word doc that upon save and close I would like a hyperlink to that specific file entered into a cell in an excel spreadsheet....is this possible?

Discussion is locked

- Collapse -
Yes.
Apr 18, 2007 1:28AM PDT

But I stop short of writing the code for people to do this. The VBA code could do that but I wouldn't use VBA but maybe WORDPIPE (see google.com).

So the answer is yes.

Bob

- Collapse -
Thanks!
Apr 18, 2007 4:27AM PDT

Thanks for the tip. I figured this could be done in VBA but was not sure. I will conduct further research now that I know this is possible.

Thanks Again!

- Collapse -
I'm intrigued.
Apr 18, 2007 4:43AM PDT

Can you explain more?

You have a Word.doc open that, when you save and close it, you want it to add a hyperlink to itself into an Excel spreadsheet.

Is there something dynamic about this Word.doc or the spreadsheet? If not, why not add the hyperlink to the Word.doc into the spreadsheet cell yourself. That way you have no need to write a macro in the document.

Or am I missing something here?

Mark

- Collapse -
Hyperlink
Apr 19, 2007 12:23AM PDT

To explain the process:

A user will open a custom form designed in Outlook. At the bottom of the form, there is a button that when clicked will open a template I made in Word. When the user completes the neccessary fields, the user will have to save the .doc under a new name. We have an Excel spreadsheet that tracks all the documents created from that template. Technically, the user can open the spreadsheet and insert the hyperlink but I would prefer to automate the process in case the user forgets to add that hyperlink. I am looking for a way that when the user saves the new .doc a hyperlink to that new .doc is inserted into the Excel spreadsheet in a specific cell(this cell will be a new cell each time).

In addition, I would like that same hyperlink to be added to another specific button in outlook onClose of the new .doc.

I sure do ask alot.....What I am asking is :Is this even possible?" If so, I am not sure where I should start. Does my code go into Outlook, Word, or Excel or does the code need to go into all three applications? I am a novice with VBA but I know it can do alot. But I think what I want is too advanced for me. Is there a way I can record a MACRO (once again basic knowledge) through different applications?

Any help would certainly be appreciated. All I normally need is a push in the right direction and I can basically take things from there.

Thanks!

- Collapse -
Ouch. Almost doomed to failure. Here's why.
Apr 19, 2007 12:37AM PDT

Most if not all antivirus may scan Outlook attachments like that for VBA code and in most cases will mark it as suspect.

Be sure you are ready for the deluge of people claiming you have sent them a virus.

What to do? Make a web site that guides them from step to step and has them upload or fetch documents if need be.

Also you have a daunting issue that such a system as you noted required the owner to layout for Microsoft Office so what to do about that? The web site is the real fix here.

Bob

- Collapse -
Outlook
Apr 19, 2007 12:46AM PDT

I already have VBA into the form for my navigation buttons opening other applications. I also have a VBA trusted certificate attached - as long as the users (who are only internal) have me listed as a trusted identity it should not be an issue. The form in Outlook is located on our server and is only user to track additional information about the contact. Yes, it can be emailed but the recipient would have to have the Outlook form installed on their PC in order to view correctly.

However; I like your idea about the web site. Is it possible to create something like I have mentioned previously on the intranet?

- Collapse -
Yes. And not everyone uses Outlook.
Apr 19, 2007 1:05AM PDT

Some use older versions, outlook express, etc.

We just completed the FAFSA - Free Application for Federal Student Aid and it's all online. Fairly complex and no Office software used.

Bob

- Collapse -
Outlook
Apr 19, 2007 1:23AM PDT

Unfortunatley, due to the nature of the business, they prefer not to have any of this information online. Even with HTTPS. Since the form is only used in this office other versions do not apply. All users internally have the same software.

I will be looking into trying this with the intranet to see how it can work from there.

Thanks!

- Collapse -
This was not shared in your posts.
Apr 19, 2007 1:31AM PDT

As such your IT staff can fix that virus issue if your corp AV starts kicking on it.

Bob

- Collapse -
Not sure if WORDPIPE is what I am looking for....
Apr 18, 2007 4:45AM PDT

I don't see how WORDPIPE can help me in my situation.

Isn't there a way I can just have an event onclose to open and paste the hyperlink?

Why would you not use VBA?

- Collapse -
Why I don't use VBA.
Apr 18, 2007 4:50AM PDT

While I will use it sparingly I won't inflict it on others in a production environment since antivirus programs or other things can cause it to fail without notice.

As to WordPipe I think it may be tough to comprehend all that we can do with such a tool.

Bob