I believe this is a stupid question but I just got stuck with it. So please help 🙂
I have made a macro that asks for a location on the file server (=client name) and then the project name. It then automatic creates the correct folders, opens my custom assembly template and changes an ipart that is by default in it.
That's all great and can save us a ton of time, but the last step is to automatic save the assembly! I just can't get it working and can't find the correct code (programming help, this forum, Google, ...)
I have defined the target folder earlier and the file name of the assembly is identical to this folder. For example
target folder = O:\Projects\clientName\ClientProject1
file name = ClientProject1.iam
-> result: O:\Projects\clientName\ClientProject1\ClientProject1.iam
the code that I think should work looks like this:
Sub SaveAssembly() Dim oAssDoc As AssemblyDocument Set oAssDoc = ThisApplication.ActiveDocument oAssDoc.SaveAs ("O:\Projects\clientName\ClientProject1\ClientProject1.iam", False) End Sub
But it doesn't work, I always get the error message "Compile error: Expected: ="
Whatever I do next I don't get the code to work
I feel stupid I can get the diffucult part working but that I'm stuck over something easy as an automatic save ...
thx for the help!
Solved! Go to Solution.
Solved by jdkriek. Go to Solution.