PDA

View Full Version : Solved: Document save



mike009
11-12-2008, 08:06 AM
Hi all,

I have a template that has an custom ribbon,
when i save the template to .doc and send it by email to one of my colleagus who works in the same company, when he opens it he does't find the custom ribbon

solution, if i navigate to office menue --> option --> addin --> manage select box ---> template --> document template

then the path is C:\Documents and Settings\<my computer name>\Desktop\temp.doc

i want to change is automaticly to be
in place of <my computer name> to the host computer
or path can be just temp.doc

i hope it's clear
Mike

lucas
11-12-2008, 09:26 AM
Mike, I don't have 2007 so I'm not sure but if you save it as .doc then I don't think the ribbon will stay with it. I think you have to save it as a 2007 file extention such as .docm or something like that.

Repeating, I don't have 2007 so I am grasping at straws.

.doc is a pre 2007 file extention for word docs.

fumei
11-12-2008, 01:22 PM
" i save the template to .doc "

Does that mean you used a template to clone a new document, and then you sent that document?

The sent document MUST have access to the original template file. If it does not, then anything in the template will not be in the document.

1. the template file could be on a network folder, and if so (and the other person has access to that folder), the template could be used.

2. C:\Documents and Settings\<my computer name> is not technically correct. It is:

C:\Documents and Settings\<username>

mike009
11-12-2008, 01:33 PM
fumei, lucas thanks for your reply


2. C:\Documents and Settings\<my computer name> is not technically correct. It is:

C:\Documents and Settings\<username>

Yes this is true,

To make it simple, i want by setting or by code to change this that the default will be something like C:\test.doc

I just want to remove my username from the file path.


To make it more clear,
let say that i don't have custom ribbon and that i don't care about it.
I have .doc or .docx or .docm .... etc some where in my pc [not in the network] i want if i send this file by email to someone, when he opens it and navigate to (office menu --> word option --> add-ins --> mange [template] --> document template ->>>>> then i don't want that he see my username there. because he got the full path of where the file located in my pc .


Thanks in advance

fumei
11-12-2008, 01:51 PM
If you do not have, or care about a custom ribbon...I do not understand what you are asking about.

If you sent a document file to someone, he is not going to see your username. No, he will NOT get the full path where the file is located on your PC.

mike009
11-12-2008, 02:38 PM
You are right, i just tried it now in my home pc, and i don't see my user name
But at work we do.

Can you open any template then save it as .doc
now open this doc file navigate to (office menu --> word option --> add-ins --> mange [template] --> document template)
there you will see full path of your template.

Can you edit this? for example create an event that will change this property
If yes then what is the name of the property

Sorry if i did confuse you.
Thanks

mike009
11-12-2008, 03:19 PM
I just had the IT mngr on the phone, he explained the problem "but he does't know the solution :(.

1- I have a template some where in my desk
2- i create a doc file from this template
3- i send this doc file to someone via email or usb ... etc
4- when he open the file then (office menu --> word option --> add-ins --> mange [template] --> document template)
he will see the path of the template which include my username.

I think a solution can be , when i close the doc or when i save it before i send it, i use an event to change the template location property.

Is this possible?

Nelviticus
11-13-2008, 09:44 AM
Do you have any VBA code in your document template? If so, add this line right at the end:
ActiveDocument.AttachedTemplate = ""
If you don't have any code in your template, add a Public Sub called 'AutoNew' and put that code in it.

This will mean that the new document does not have any template attached at all.

Regards

fumei
11-13-2008, 01:02 PM
But do you not want the template attached? Do you not want to have the qualities (styles or whatever) of the template? If not...why have a template????

The solution is to NOT have the template on your computer. You are obviously talking about a work environment, so put the template in a network folder. the path will show THAT, not your username.

Properly speaking, in this situation, it should be in a network folder anyway.

Nelviticus
11-14-2008, 02:09 AM
But do you not want the template attached? Do you not want to have the qualities (styles or whatever) of the template? If not...why have a template????

Off-topic, sorry, but - there are many reasons why you wouldn't want a template attached. Having to email documents outside of your organisation is one. Also we have several offices and if someone in our Glasgow office has to load a template over the network from our London office every time they open a document that was created in London that can get painful.

When you create a doc from a template it acquires all of the styles etc. that were in the template. If you detach it then those styles become fixed; if you subsequently change the template, that doc you created won't change. In many cases this is a good thing - you don't necessarily want to open a letter you sent last week and find that it now looks different to how it did when you sent it.

Regards

mike009
11-14-2008, 08:30 AM
First i would like to thank you all,

The problem solved thanks to Nelviticus,

why not adding the template in the network?
because users must be able to use the template out the company Ex. home.

what the custom ribbon does?
it has some buttons
1- edit some properties logos, owner, company location .... etc
there are 7000 +/- users will use this template in different locations in europe so they will be able to change the document properties thanks to the custom ribbon that calls a macro to run a form for easy usage.

what i did is i attached the template to the template :rotlaugh:
and it did work, don't ask me how, but it did work :rotlaugh:

now if i create a doc file from the template, send this doc file to someone
he can see the custom ribbon and execute macro

again, i saved it as doc not docm

thanks again for your help
Mike

fumei
11-14-2008, 11:35 AM
Very good points Nelviticus.

Although I do want to point out that you are a wee bit incorrect with:

"there are many reasons why you wouldn't want a template attached."

A Word document always has a template attached. If you detach a template from a document (say a document created from Yadda.dot), then Word attaches the local Normal.dot.

At least it does as far as I know. I have never, ever, seen a Word document with blank as the template.