• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Shapes in Excel vba

Hi Experts,

do you have any idea how to use object shape in vba coding if want to open it.

please suggest me if any.

attached example

Regards
Nipendra
 

Attachments

  • Sample1.xlsx
    25 KB · Views: 5
Nipendra

What do you mean open an Object shape?

Do you mean access a shape on the worksheet or on a VBA UserForm ?

More details please
 
Hi Nipendra ,

I think it would be better to use a shape , and link your document to this shape ; this way accessing this link is easy by using :

Activesheet.Shape(Shape_Name).Hyperlink.Name

and opening the document is possible using :

Activesheet.Shape(Shape_Name).Hyperlink.Follow

The only reason to embed the document within your Excel file may be if you want to distribute this through email , where you only need to send one file ; if you link the Word document to the Excel file , you will need to send both files , and the path needs to be maintained , or changed when the Excel file is opened.

Narayan
 
Hui I am talking about embedded word file which comes as a icon on the excel sheet I have attached the example also,
can we use it in vba programming to make further change as required,

actually whatever solution you have provided to me it was awesome, and I have developed something whatever I needed but now I want to remove word document dependency where I am inserting the respected values to create a document . so I got only one solution that I can embedded as icon with same excel(Automation file) and then can try to open the embedded word document and then can insert whatever I want, so after that I don't need word document separately I only need a excel file


please suggest your ideas.

Regards
Nipendra
 
Hi, Niipendra.dhiman!
I should admit that I don't understand what you're trying to achieve. Would you please elaborate and explain the detailed process in other words? Thank you.
Regards!
 
Hi SirJB7 thanks for your valuable response,

but actually I was trying explain to Hui because earlier I got something from him and he knew that what Is am trying to achieve here ok let me give you a brief-:

Actually I am working on a project where I need a protect word document as a output with copy of PDF for the same, I have developed the same thing but here the requirement has been changed.
current requirement -: need protected word document but without dependency of word document please don't confuse I am just going to tell you what is happening .


I have developed-:

1)-there is a user from for input the values and I want these values to a word document, this word document is a agreement document
2)- I need to insert these values to some specify place in the same document(agreement document)
3)- It should be saveas where user need to save it.
4)- On the same click a PDF copy required.
5)- This word document should be protected(read only)


these all above requirement I have completed and
for above development I needed the same word document separately so then I can find and replace the values through vba code

but with current requirement the word document dependency should not be there,
so I got only one solution that I can insert this document as a object shape (which comes as icon n the sheet)in the same excel macro and then I can be use it from there. and I am able to open this document through vba code but don't know very much how to use this object in vba programming.

I need only one thing here if you can help me,

I want to open this document form the object shape which I have inserted in sheet and then everything should be happen same. so that eventually I'll able to remove word document dependency

let me know if any confusion.

I have attached file here.

Warm Regards
Nipendra
 
Back
Top