Hello all,
I have found this script to generate a parts list with a thumbnail. It places the parts list into a new word document. Is there any VBscript pro who can help me modify the code just a bit?
I am looking to change the script to open a template file instead of a blank new word document.
Script is attached as script.txt
Steven.
Hello all,
I have found this script to generate a parts list with a thumbnail. It places the parts list into a new word document. Is there any VBscript pro who can help me modify the code just a bit?
I am looking to change the script to open a template file instead of a blank new word document.
Script is attached as script.txt
Steven.
I will tag @Curtis_Waguespack and he should be able to assist and/or you can post over in the Inventor Customization Forum
Mark Lancaster
& Autodesk Services MarketPlace Provider
Autodesk Inventor Certified Professional & not an Autodesk Employee
Likes is much appreciated if the information I have shared is helpful to you and/or others
Did this resolve your issue? Please accept it "As a Solution" so others may benefit from it.
I will tag @Curtis_Waguespack and he should be able to assist and/or you can post over in the Inventor Customization Forum
Mark Lancaster
& Autodesk Services MarketPlace Provider
Autodesk Inventor Certified Professional & not an Autodesk Employee
Likes is much appreciated if the information I have shared is helpful to you and/or others
Did this resolve your issue? Please accept it "As a Solution" so others may benefit from it.
Hi stevenL2ZFM,
I didn't test it, but I think something like this should work.
Replace this:
' Create a new Word document. Dim wordDoc As Word.Document Set wordDoc = wordApp.Application.Documents.Add
With something like this:
sWordTemplate = "C:\Program Files\Microsoft Office" _ & "\Templates\Memos\Professional Memo.dot" ' Create a new Word document. Dim wordDoc As Word.Document Set wordDoc = wordApp.Application.Documents.Add(Template:=sWordTemplate)
Source:
https://msdn.microsoft.com/en-us/library/office/ff845011.aspx
Also as Mark.Lancaster mentioned Also just as a tip, you can search and ask programming questions of this type are best placed on the Inventor Customization forum:
http://forums.autodesk.com/t5/Autodesk-Inventor-Customization/bd-p/120
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com
Hi stevenL2ZFM,
I didn't test it, but I think something like this should work.
Replace this:
' Create a new Word document. Dim wordDoc As Word.Document Set wordDoc = wordApp.Application.Documents.Add
With something like this:
sWordTemplate = "C:\Program Files\Microsoft Office" _ & "\Templates\Memos\Professional Memo.dot" ' Create a new Word document. Dim wordDoc As Word.Document Set wordDoc = wordApp.Application.Documents.Add(Template:=sWordTemplate)
Source:
https://msdn.microsoft.com/en-us/library/office/ff845011.aspx
Also as Mark.Lancaster mentioned Also just as a tip, you can search and ask programming questions of this type are best placed on the Inventor Customization forum:
http://forums.autodesk.com/t5/Autodesk-Inventor-Customization/bd-p/120
I hope this helps.
Best of luck to you in all of your Inventor pursuits,
Curtis
http://inventortrenches.blogspot.com
I wasn't able to get it to work... maybe my coding skills are too elementary 😄
I wasn't able to get it to work... maybe my coding skills are too elementary 😄
Try this. If it's truly .vbs, you can't declare any complicated object types beyond the basic ones.
sWordTemplate = "C:\Program Files\Microsoft Office" _ & "\Templates\Memos\Professional Memo.dot" Dim wordDoc Set wordDoc = wordApp.Application.Documents.Add(Template:=sWordTemplate)
Try this. If it's truly .vbs, you can't declare any complicated object types beyond the basic ones.
sWordTemplate = "C:\Program Files\Microsoft Office" _ & "\Templates\Memos\Professional Memo.dot" Dim wordDoc Set wordDoc = wordApp.Application.Documents.Add(Template:=sWordTemplate)
Thanks for the reply. This is not working either.
But i found a new problem with the add-in 😞 After running the add-in, all fields within the parts list become static values and not associated with the part referenced.
There were two versions of this code from the website I found it on.
http://modthemachine.typepad.com/my_weblog/2010/02/parts-list-with-thumbnail-image.html
One installs as an add-in (which works but has the problem listed above)
The other is copied then pasted into a module. It worked a few times, then it just stopped working and has a compiling error (see screenshot error.jpg).
Maybe the error is a quick fix and I can try to implement the template coding you provided?
Thanks for the help !
Steven
Thanks for the reply. This is not working either.
But i found a new problem with the add-in 😞 After running the add-in, all fields within the parts list become static values and not associated with the part referenced.
There were two versions of this code from the website I found it on.
http://modthemachine.typepad.com/my_weblog/2010/02/parts-list-with-thumbnail-image.html
One installs as an add-in (which works but has the problem listed above)
The other is copied then pasted into a module. It worked a few times, then it just stopped working and has a compiling error (see screenshot error.jpg).
Maybe the error is a quick fix and I can try to implement the template coding you provided?
Thanks for the help !
Steven
Can't find what you're looking for? Ask the community or share your knowledge.